/**
 * Universe2 Public Appointment Page Styles
 *
 * Light, clean, mobile-first. Distinct from the dark internal app.
 */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  color: #2a2a2a;
  background: #f4f6f8;
  line-height: 1.5;
}

/* Header */
.book-header {
  background: #0e1118;
  color: #fff;
  padding: 1.067rem 1.333rem;
}
.book-header-inner {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.067rem;
}
.book-logo {
  height: 2.133rem;
  width: auto;
}
.book-header-title {
  font-size: 1.2rem;
  font-weight: 500;
  color: #e0e0e0;
}

/* Main container */
.book-main {
  max-width: 48rem;
  margin: 1.6rem auto;
  padding: 0 1.067rem;
}

/* Step indicator */
.book-steps {
  display: flex;
  gap: 0.267rem;
  margin-bottom: 1.6rem;
  background: #fff;
  border-radius: 0.533rem;
  padding: 0.533rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  flex-wrap: wrap;
}
.book-step {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.533rem;
  padding: 0.533rem 0.8rem;
  font-size: 0.867rem;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #e4e7eb;
  color: #444;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}
.book-step.done { color: #2a8a4a; }
.book-step.done span { background: #2a8a4a; color: #fff; }
.book-step.done span::after { content: '\2713'; }
.book-step.done span > * { display: none; }
.book-step.active { color: #2a6aa8; font-weight: 600; }
.book-step.active span { background: #2a6aa8; color: #fff; }

/* Panels (each step) */
.book-panel {
  background: #fff;
  border-radius: 0.533rem;
  padding: 1.867rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.book-panel h2 {
  margin: 0 0 1.333rem;
  font-size: 1.467rem;
  font-weight: 600;
  color: #1a1a1a;
}

/* Agent card (step 1) */
.book-agent-card {
  display: flex;
  align-items: center;
  gap: 1.067rem;
  padding: 1.067rem;
  background: #f4f6f8;
  border-radius: 0.533rem;
  margin-bottom: 1.333rem;
}
.book-agent-avatar {
  width: 4.267rem;
  height: 4.267rem;
  border-radius: 50%;
  background: #2a6aa8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.467rem;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.book-agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.book-agent-name { font-size: 1.2rem; font-weight: 600; color: #1a1a1a; }
.book-agent-tz { font-size: 0.867rem; color: #444; margin-top: 0.133rem; }

/* Form fields */
.book-field {
  margin-bottom: 1.067rem;
}
.book-field label {
  display: block;
  font-size: 0.867rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.4rem;
}
.book-field input, .book-field select, .book-field textarea {
  width: 100%;
  padding: 0.667rem 0.8rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #d0d4da;
  border-radius: 0.4rem;
  background: #fff;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.book-field input:focus, .book-field select:focus, .book-field textarea:focus {
  border-color: #2a6aa8;
  box-shadow: 0 0 0 3px rgba(42,106,168,0.1);
}
.book-field input.error {
  border-color: #cc4444;
  background: #fff5f5;
}
.book-field textarea { resize: vertical; min-height: 4.8rem; }
.book-hint { font-size: 0.8rem; color: #444; margin-top: 0.267rem; }
.book-field-row { display: flex; gap: 0.8rem; }
.book-field-row .book-field { flex: 1; }

.book-checkbox { display: flex; align-items: center; gap: 0.667rem; font-weight: normal !important; cursor: pointer; }
.book-checkbox input[type="checkbox"] { width: auto; margin: 0; }

/* intlTelInput integration */
.book-field .iti { width: 100%; display: block; }
.book-field .iti input { padding-left: 6rem !important; }
.book-field .iti--separate-dial-code .iti__selected-flag { background: transparent; }

/* Action buttons */
.book-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1.6rem;
  padding-top: 1.067rem;
  border-top: 1px solid #e4e7eb;
}
.book-actions button {
  padding: 0.667rem 1.467rem;
  font-size: 1rem;
  font-family: inherit;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: background 0.15s;
  font-weight: 500;
}
.book-btn-back {
  background: #e4e7eb;
  color: #444;
}
.book-btn-back:hover { background: #d0d4da; }
.book-btn-next, .book-btn-confirm {
  background: #2a6aa8;
  color: #fff;
  margin-left: auto;
}
.book-btn-next:hover, .book-btn-confirm:hover { background: #1e558a; }
.book-btn-next:disabled, .book-btn-confirm:disabled { opacity: 0.5; cursor: default; }

/* Calendar */
.book-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.book-cal-nav button {
  background: #e4e7eb;
  border: none;
  border-radius: 0.267rem;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.2rem;
  cursor: pointer;
  color: #444;
}
.book-cal-nav button:hover { background: #d0d4da; }
.book-cal-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
}
.book-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.267rem;
}
.book-cal-header {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #444;
  padding: 0.533rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.book-cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border-radius: 0.4rem;
  background: #f4f6f8;
  color: #1a1a1a;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.book-cal-cell:hover:not(.unavailable):not(.empty) {
  background: #2a6aa8;
  color: #fff;
}
.book-cal-cell.unavailable {
  background: transparent;
  color: #c8ccd0;
  cursor: not-allowed;
  text-decoration: line-through;
}
.book-cal-cell.empty { background: transparent; cursor: default; }
.book-cal-cell.today {
  box-shadow: inset 0 0 0 2px #e0a030;
}
.book-cal-cell.selected {
  background: #2a6aa8;
  color: #fff;
  font-weight: 600;
}

/* Time slots */
.book-selected-date {
  font-size: 1.067rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 1.067rem;
}
.book-slots-section { margin-bottom: 1.333rem; }
.book-slots-section h3 {
  font-size: 0.933rem;
  font-weight: 600;
  color: #444;
  margin: 0 0 0.533rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.book-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.667rem, 1fr));
  gap: 0.533rem;
}
.book-slot {
  padding: 0.8rem;
  font-size: 0.933rem;
  font-family: inherit;
  background: #fff;
  border: 1px solid #d0d4da;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: all 0.1s;
  color: #1a1a1a;
}
.book-slot:hover {
  border-color: #2a6aa8;
  background: #eef3f8;
}
.book-slot.selected {
  background: #2a6aa8;
  border-color: #2a6aa8;
  color: #fff;
  font-weight: 600;
}
.book-slots-loading, .book-slots-empty {
  text-align: center;
  padding: 2rem;
  color: #444;
}
.book-slots-tz {
  font-size: 0.8rem;
  color: #444;
  margin-top: 0.8rem;
  text-align: center;
  font-style: italic;
}

/* Review */
.book-review {
  background: #f4f6f8;
  border-radius: 0.533rem;
  padding: 1.067rem;
}
.book-review-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.533rem 0;
  border-bottom: 1px solid #e4e7eb;
  gap: 1.067rem;
}
.book-review-row:last-child { border-bottom: none; }
.book-review-row span {
  font-size: 0.867rem;
  color: #444;
  font-weight: 500;
  flex-shrink: 0;
  min-width: 5.333rem;
}
.book-review-row strong {
  color: #1a1a1a;
  font-weight: 500;
  text-align: right;
}
.book-review-tz { color: #444; font-weight: normal; font-size: 0.8rem; }

.book-error {
  color: #cc4444;
  font-size: 0.867rem;
  margin-top: 0.8rem;
  text-align: right;
}

/* Success */
.book-success { text-align: center; }
.book-success-icon {
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 50%;
  background: #2a8a4a;
  color: #fff;
  font-size: 2.667rem;
  line-height: 72px;
  margin: 0 auto 1.333rem;
  font-weight: bold;
}
.book-success-detail {
  background: #f4f6f8;
  border-radius: 0.533rem;
  padding: 1.333rem;
  margin: 1.333rem auto;
  max-width: 32rem;
  text-align: left;
}
.book-success-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.533rem 0;
  border-bottom: 1px solid #e4e7eb;
  gap: 1.067rem;
}
.book-success-row:last-child { border-bottom: none; }
.book-success-row span { font-size: 0.867rem; color: #444; }
.book-success-row strong { color: #1a1a1a; font-weight: 500; text-align: right; }
.book-success-hint { color: #444; font-size: 0.933rem; }

/* Footer */
.book-footer {
  text-align: center;
  color: #666;
  font-size: 0.8rem;
  padding: 1.6rem 1.067rem;
}

/* Mobile */
@media (max-width: 42.667rem) {
  .book-main { padding: 0 0.533rem; margin-top: 0.8rem; }
  .book-panel { padding: 1.333rem; }
  .book-steps { padding: 0.267rem; gap: 0.133rem; }
  .book-step { padding: 0.4rem 0.533rem; font-size: 0.8rem; }
  .book-step span { width: 1.333rem; height: 1.333rem; font-size: 0.733rem; }
  .book-field-row { flex-direction: column; gap: 0; }
  .book-cal-cell { font-size: 0.867rem; }
  .book-actions { flex-wrap: wrap; }
}
