:root {
  --primary-color: #83358f;
  --bg-color: #f9f9f9;
  --border-color: #ddd;
  --font-color: #333;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: var(--bg-color);
  color: var(--font-color);
  padding: 20px;
  margin: 0;
}

.container {
  max-width: 600px;
  margin: auto;
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo {
  width: 200px;
  display: block;
  margin: 0 auto 20px;
  height: auto;
}

h2 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--primary-color);
}

.customer-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
  gap: 10px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 12px 16px;
  border-radius: 8px;
  background: #e0e0e0;
  color: #333;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.3s;
  border: 2px solid transparent;
}

.tab.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(131, 53, 143, 0.3);
}

.section {
  margin-bottom: 20px;
}

.section label {
  display: block;
  margin-bottom: 12px;
}

.name-row {
  display: flex !important;
  gap: 20px;
  width: 100%;
  margin-bottom: 10px;
}

.name-row .half {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.name-row label {
  display: block;
  margin-bottom: 0px;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
  transition: 0.3s;
}

.phone-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-badge {
  background: #f0f4ff;
  color: #2a4d9b;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid #d0d8f0;
  min-width: 55px;
  text-align: center;
}

label {
  display: block;
  margin-bottom: 10px;
}

input[type="text"],
input[type="tel"],
select,
input[type="date"] {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
  outline: none;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

input:focus,
select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(131, 53, 143, 0.4);
}

.radio-group {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.time-range {
  margin: 15px 0;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.slot {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  flex: 0 0 150px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.slot:hover {
  background: var(--primary-color);
  color: #fff;
}

.slot.selected {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(131, 53, 143, 0.4);
}

.hidden {
  display: none;
}

.large-slot {
  flex: 0 1 30%;
  min-width: 130px;
  max-width: 160px;
  height: 60px;
  padding: 8px 4px;
  font-size: 18px;
  font-weight: 600;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.large-slot:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
}

button {
  background: var(--primary-color);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .large-slot {
    flex: 1 1 100%;
    max-width: none;
  }
}

.test-banner {
  background: #ffcc00;
  color: #000;
  padding: 12px;
  text-align: center;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 2px solid #e6b800;
}

/* follow-up small uniform slots */
.small-slot {
  flex: 0 0 90px;
  height: 36px;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Error message */
.error {
  color: #d32f2f;
  font-size: 13px;
  margin-top: 4px;
}

/* Spinner */
.spinner {
  width: 28px;
  height: 28px;
  border: 4px solid #e2d4e6;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Review Section */
#reviewSection {
  margin-top: 30px;
}

/* Review box */
.review-box {
  background: #ffffff;
  border: 1px solid #d9c9e8;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
  padding: 25px;
  border-radius: 12px;
  margin-top: 20px;
  text-align: left;
}

/* Title */
.review-box h3 {
  margin-bottom: 15px;
  color: #83358f;
  font-size: 20px;
  font-weight: 700;
}

/* Table */
.review-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  text-align: left;
}

.review-table td {
  padding: 10px 8px;
  font-size: 15px;
  border-bottom: 1px solid #e2d9f3;
  vertical-align: top;
}

.review-table td:first-child {
  width: 40%;
  font-weight: 600;
  color: #4a3b52;
}

/* Highlight rows */
.highlight-row td {
  background: #fff0ff;
  font-weight: 700;
  color: #83358f;
}

/* Confirm button */
.confirm-btn {
  margin-top: 25px;
  background: #83358f;
  color: white;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
}

.confirm-btn:hover {
  background: #6b2b73;
}

.review-actions {
  display: flex;
  gap: 12px;
  margin-top: 25px;
  flex-wrap: wrap;
}

/* Back button */
.back-btn {
  background: #e7d9f3;
  color: #4a3b52;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  flex: 1;
  text-align: center;
}

.back-btn:hover {
  background: #d2c0e6;
}

/*MOBILE RESPONSIVENESS */
@media (max-width: 480px) {
  .review-box {
    padding: 18px;
  }

  .review-table td {
    display: block;
    width: 100%;
    border-bottom: none;
    padding: 8px 0;
  }

  .review-table tr {
    margin-bottom: 12px;
    border-bottom: 1px solid #e2d9f3;
    padding-bottom: 8px;
  }

  .review-table td:first-child {
    font-size: 14px;
    color: #6a5a75;
    margin-bottom: 4px;
  }

  .highlight-row td {
    background: #fff0ff;
    padding: 10px 0;
    border-radius: 6px;
  }

  .review-box h3 {
    font-size: 18px;
    text-align: center;
  }

  .review-actions {
    flex-direction: column;
  }

  .back-btn,
  .confirm-btn {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .small-slot {
    flex: 0 0 72px;
    height: 34px;
    font-size: 13px;
  }
}
