/* ════════════════════════════════════════════════════
   book_appointment.css
   ════════════════════════════════════════════════════ */

/* ── Box-sizing reset ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Prevent horizontal overflow ─────────────────────── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ── Variables ──────────────────────────────────────── */
:root {
  --bg:           #0d1117;
  --surface:      #161b22;
  --glass-bg:     rgba(255,255,255,.04);
  --glass-border: rgba(255,255,255,.09);
  --accent:       #4f8ef7;
  --accent-hover: #6ba3ff;
  --accent-soft:  rgba(79,142,247,.12);
  --text:         #e6edf3;
  --text-muted:   #8b949e;
  --text-subtle:  #6e7681;
  --success:      #3fb950;
  --warning:      #d29922;
  --danger:       #f85149;
  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 8px 32px rgba(0,0,0,.45);
  --transition:   .2s ease;
}

/* ═══════════════════════════════════════════════════════
   PAGE LAYOUT
═══════════════════════════════════════════════════════ */
.booking-page {
  padding: 2.5rem 1.25rem 4rem;
  min-height: 80vh;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 768px) {
  .booking-page { padding: 1.5rem 1rem 3rem; }
}

@media (max-width: 640px) {
  .booking-page { padding: 1.25rem 0.85rem 3rem; }
}

@media (max-width: 400px) {
  .booking-page { padding: 1rem 0.65rem 2.5rem; }
}

.booking-hero { margin-bottom: 2.4rem; }

@media (max-width: 640px) {
  .booking-hero { margin-bottom: 1.6rem; }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--text-muted);
  font-size: .85rem;
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color var(--transition);
}
.back-link:hover { color: var(--accent); }

.hero-tag {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.page-title {
  font-size: clamp(1.2rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 .6rem;
}

.page-text {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0;
}

@media (max-width: 640px) {
  .page-text { font-size: .9rem; }
}

@media (max-width: 400px) {
  .page-text { font-size: .85rem; }
}

/* ── Two-column grid ─────────────────────────────────── */
.booking-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.8rem;
  align-items: start;
  width: 100%;
}

@media (max-width: 1024px) {
  .booking-layout {
    grid-template-columns: 280px 1fr;
    gap: 1.4rem;
  }
}

@media (max-width: 900px) {
  .booking-layout {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .therapist-profile-card {
    position: static !important;
    top: unset !important;
  }
}

@media (max-width: 640px) {
  .booking-layout { gap: 1rem; }
}

/* ── Glass panel ─────────────────────────────────────── */
.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.8rem;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 641px) and (max-width: 900px) {
  .glass-panel { padding: 1.4rem; }
}

@media (max-width: 640px) {
  .glass-panel { padding: 1rem 0.9rem; }
}

@media (max-width: 400px) {
  .glass-panel { padding: 0.9rem 0.75rem; border-radius: 10px; }
}

/* ── Booking form panel — don't stretch to match card height ── */
.booking-form-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
  align-self: start;
}

@media (max-width: 640px) {
  .booking-form-panel { gap: 1.5rem; }
}

/* ═══════════════════════════════════════════════════════
   THERAPIST PROFILE CARD
═══════════════════════════════════════════════════════ */
.therapist-profile-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: sticky;
  top: 90px;
}

/* On tablet, show profile card as horizontal strip */
@media (min-width: 641px) and (max-width: 900px) {
  .therapist-profile-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1.2rem;
    align-items: start;
  }
  .profile-photo-wrap {
    grid-row: 1 / 4;
  }
}

@media (max-width: 640px) {
  .therapist-profile-card { gap: 1rem; }
}

.profile-photo-wrap {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  max-height: 260px;
}

.profile-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-photo-fallback {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #1c2a44, #1a3a6a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  border-radius: var(--radius-sm);
  letter-spacing: -.02em;
}

@media (max-width: 480px) {
  .profile-photo-wrap     { max-height: 160px; }
  .profile-photo-fallback { height: 120px; font-size: 2.2rem; }
}

@media (max-width: 360px) {
  .profile-photo-wrap     { max-height: 130px; }
  .profile-photo-fallback { height: 100px; font-size: 1.8rem; }
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.profile-name    { font-size: 1.3rem; font-weight: 700; color: var(--text); margin: 0; }
.profile-meta,
.profile-country { font-size: .85rem; color: var(--text-muted); margin: 0; }

@media (max-width: 480px) {
  .profile-name { font-size: 1.15rem; }
  .profile-meta { font-size: .8rem; }
}

.profile-rating {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .88rem;
}

.star        { color: var(--text-subtle); font-size: 1rem; }
.star.filled { color: #e3b341; }
.star.half   { color: #e3b341; opacity: .6; }
.star.empty  { color: var(--text-subtle); }

.rating-num {
  color: var(--text);
  font-weight: 700;
  font-size: .9rem;
}

/* ── Consultation price ──────────────────────────────── */
.profile-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 4px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(79,142,247,.4), 0 2px 8px rgba(0,0,0,.3);
}

.profile-price::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
}

.price-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
}

.profile-price strong {
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -.03em;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

@media (max-width: 480px) {
  .profile-price { padding: 13px 15px; }
  .profile-price strong { font-size: 1.25rem; }
}

.section-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .65rem;
}

.badge-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.badge {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(79,142,247,.2);
  border-radius: 20px;
  padding: .25rem .75rem;
  font-size: .78rem;
  font-weight: 600;
}

@media (max-width: 480px) {
  .badge { font-size: .72rem; padding: .2rem .6rem; }
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.spec-list li {
  font-size: .83rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.spec-list li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.profile-expertise,
.profile-specs,
.profile-summary {
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
}

.profile-summary {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════
   BOOKING FORM PANEL — SECTIONS
═══════════════════════════════════════════════════════ */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: .75rem;
}

@media (max-width: 480px) {
  .form-section-title { font-size: .9rem; gap: .5rem; }
}

.step-badge {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .step-badge { width: 22px; height: 22px; min-width: 22px; font-size: .72rem; }
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.field-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .35rem;
}

.required { color: var(--danger); }

/* ── Inputs ──────────────────────────────────────────── */
.field-input {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  padding: .75rem 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  max-width: 100%;
  display: block;
}

.field-input::placeholder { color: var(--text-subtle); }

.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

@media (max-width: 480px) {
  .field-input { font-size: .95rem; padding: .7rem .85rem; }
}

/* ── Phone field ─────────────────────────────────────── */
.phone-input-wrap {
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 100%;
  align-items: center;
}

.country-code-select {
  flex: 0 0 130px;
  width: 130px;
  min-width: 0;
  cursor: pointer;
  padding: .75rem .6rem;
  appearance: auto;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  display: block;
}

.country-code-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.phone-input-wrap #patientPhone {
  flex: 1;
  min-width: 0;
  width: auto;
}

.field-hint {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 2px;
}

/* Stack phone field on small phones only */
@media (max-width: 420px) {
  .phone-input-wrap      { flex-direction: column; align-items: stretch; gap: 6px; }
  .country-code-select   { flex: unset; width: 100%; }
  .phone-input-wrap #patientPhone { width: 100%; }
}

/* ── Timezone notice ─────────────────────────────────── */
.timezone-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 11px 15px;
  border-radius: 10px;
  background: rgba(29,158,117,.08);
  border: 1px solid rgba(29,158,117,.22);
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.timezone-notice__icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.timezone-notice strong {
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 640px) {
  .timezone-notice { font-size: .78rem; padding: 9px 11px; }
}

/* ═══════════════════════════════════════════════════════
   SLOTS
═══════════════════════════════════════════════════════ */
.slots-container {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.slots-loading,
.slots-error,
.slots-empty {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--text-muted);
  font-size: .9rem;
  padding: 1rem 0;
}

.slots-error { color: var(--danger); }

/* ── Day group ───────────────────────────────────────── */
.slot-group {
  border: 1px solid var(--glass-border, rgba(0,0,0,0.12));
  border-radius: var(--radius-sm);
  overflow: hidden;
  animation: fadeSlideUp .28s ease both;
  outline: 1px solid rgba(120,140,160,0.18);
  outline-offset: -1px;
}

.slot-group:nth-child(1) { animation-delay: .04s; }
.slot-group:nth-child(2) { animation-delay: .10s; }
.slot-group:nth-child(3) { animation-delay: .16s; }
.slot-group:nth-child(4) { animation-delay: .22s; }
.slot-group:nth-child(5) { animation-delay: .28s; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Day header ──────────────────────────────────────── */
.slot-day-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1rem;
  cursor: pointer;
  background: rgba(255,255,255,.03);
  user-select: none;
  transition: background var(--transition);
}

.slot-day-header:hover { background: rgba(255,255,255,.06); }

.slot-day-name {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .slot-day-name  { white-space: normal; font-size: .75rem; letter-spacing: .03em; }
  .slot-day-header { padding: .6rem .75rem; }
}

@media (max-width: 360px) {
  .slot-day-name { font-size: .7rem; }
}

.slot-count {
  font-size: .75rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 20px;
  padding: .15rem .55rem;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.slot-chevron {
  font-size: .75rem;
  color: var(--text-subtle);
  flex-shrink: 0;
  transition: transform .2s ease;
}

/* ── Slot body ───────────────────────────────────────── */
.slot-body {
  padding: .75rem 1rem 1rem;
  border-top: 1px solid rgba(120,140,160,0.2);
  max-height: 400px;
  overflow-y: auto;
  opacity: 1;
  transition: max-height .25s ease, opacity .2s ease;
}

.slot-body.collapsed {
  max-height: 0 !important;
  padding-top: 0;
  padding-bottom: 0;
  border-top: none;
  opacity: 0;
  overflow: hidden;
}

@media (max-width: 640px) {
  .slot-body { padding: .6rem .75rem .85rem; }
}

/* ── Slot grid ───────────────────────────────────────── */
.slot-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: .45rem;
}

@media (max-width: 768px) {
  .slot-time-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .slot-time-grid { grid-template-columns: repeat(2, 1fr); gap: .4rem; }
}

@media (max-width: 360px) {
  .slot-time-grid { grid-template-columns: 1fr; }
}

/* ── Slot button ─────────────────────────────────────── */
.slot-btn {
  background: rgba(79,142,247,.06);
  border: 1.5px solid rgba(79,142,247,.3);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
  padding: .5rem .6rem;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  width: 100%;
  transition: background .15s, color .15s, transform .13s, box-shadow .15s;
}

@media (max-width: 640px) {
  .slot-btn { font-size: .78rem; padding: .55rem .4rem; white-space: normal; line-height: 1.3; }
}

@media (max-width: 360px) {
  .slot-btn { font-size: .8rem; padding: .6rem .5rem; }
}

.slot-btn:hover:not(.selected) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.slot-btn:active { transform: translateY(0); }

.slot-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(79,142,247,.35);
}

/* ── Slot summary strip ──────────────────────────────── */
.slot-summary {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--accent-soft);
  border: 1px solid rgba(79,142,247,.22);
  border-radius: var(--radius-sm);
  padding: .8rem 1.1rem;
  font-size: .9rem;
  color: var(--accent);
  font-weight: 600;
  transition: all var(--transition);
}

@media (max-width: 640px) {
  .slot-summary { flex-wrap: wrap; font-size: .82rem; padding: .65rem .9rem; }
}

@media (max-width: 400px) {
  .slot-summary { font-size: .78rem; padding: .6rem .75rem; }
}

.slot-summary-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   FORM ACTIONS
═══════════════════════════════════════════════════════ */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 1.4rem;
}

/* Stack buttons on all phones (up to 540px covers all common phone sizes) */
@media (max-width: 540px) {
  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: .7rem;
    padding-top: 1.1rem;
  }
  .cancel-btn,
  .confirm-btn { width: 100%; font-size: 1rem; padding: .9rem 1rem; text-align: center; }
}

.cancel-btn {
  text-decoration: none;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 600;
  padding: .7rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  text-align: center;
  transition: all var(--transition);
}

.cancel-btn:hover { color: var(--text); border-color: var(--text-muted); }

.confirm-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 700;
  padding: .75rem 2rem;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 16px rgba(79,142,247,.3);
  transition: background .2s, transform .12s, box-shadow .2s;
}

.confirm-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 6px 22px rgba(79,142,247,.45);
  transform: translateY(-1px);
}

.confirm-btn:active:not(:disabled) { transform: translateY(0); }

.confirm-btn:disabled { opacity: .45; cursor: not-allowed; }

.form-section:focus-within .step-badge {
  box-shadow: 0 0 0 4px rgba(79,142,247,.2);
}

/* ═══════════════════════════════════════════════════════
   LOADERS
═══════════════════════════════════════════════════════ */
.loader-sm {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--glass-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

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

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, rgba(255,255,255,.06) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
  height: 1em;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════ */
.page-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1c2a44;
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 40px;
  padding: .7rem 1.8rem;
  font-size: .9rem;
  font-weight: 600;
  z-index: 9999;
  box-shadow: var(--shadow);
  white-space: nowrap;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .25s ease, transform .25s ease;
}

.page-toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}

.toast--success { background: #0f6e56; border-color: #0f6e56; color: #fff; }
.toast--error   { background: #993c1d; border-color: #993c1d; color: #fff; }

@media (max-width: 540px) {
  .page-toast {
    left: 1rem;
    right: 1rem;
    bottom: 1.2rem;
    transform: none;
    white-space: normal;
    text-align: center;
    font-size: .84rem;
    border-radius: 14px;
    padding: .65rem 1.2rem;
  }
  .page-toast.hidden { transform: translateY(8px); }
}

/* ═══════════════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════════════ */
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════
   T&C CHECKBOX
═══════════════════════════════════════════════════════ */
.tnc-section {
  padding-top: 4px;
  border-top: 1px solid var(--glass-border);
  margin-top: 4px;
}

.tnc-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.tnc-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tnc-custom-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 5px;
  border: 2px solid rgba(100,120,150,0.45);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
}

.tnc-custom-check svg {
  width: 11px;
  height: 9px;
  color: transparent;
  transition: color .15s ease;
}

.tnc-checkbox:checked + .tnc-custom-check {
  background: var(--accent);
  border-color: var(--accent);
}
.tnc-checkbox:checked + .tnc-custom-check svg { color: #fff; }

.tnc-checkbox:focus-visible + .tnc-custom-check {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tnc-checkbox-label:hover .tnc-custom-check {
  transform: scale(1.07);
  border-color: var(--accent);
}

.tnc-text {
  font-size: .86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.tnc-link {
  all: unset;
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: opacity .15s;
}
.tnc-link:hover { opacity: .75; }

.tnc-hint {
  margin-top: 8px;
  margin-left: 32px;
  font-size: .78rem;
  color: var(--danger);
  font-weight: 500;
}

@media (max-width: 480px) {
  .tnc-text { font-size: .82rem; }
  .tnc-hint { margin-left: 28px; font-size: .75rem; }
}

/* ═══════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity .22s ease;
}

.modal-overlay.hidden         { display: none; }
.modal-overlay.modal--visible { opacity: 1; }

.modal-container {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px rgba(0,0,0,.06), 0 20px 48px rgba(0,0,0,.45);
  transform: translateY(18px) scale(.98);
  transition: transform .26s cubic-bezier(.34,1.36,.64,1);
}

.modal-overlay.modal--visible .modal-container {
  transform: translateY(0) scale(1);
}

/* Tablet: slightly narrower max-width */
@media (min-width: 481px) and (max-width: 768px) {
  .modal-container { max-width: 94vw; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  letter-spacing: -.01em;
}

.modal-close {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: background .15s, color .15s;
}
.modal-close:hover { background: rgba(255,255,255,.06); color: var(--text); }
.modal-close svg   { width: 18px; height: 18px; pointer-events: none; }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}
.modal-body::-webkit-scrollbar       { width: 5px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 99px; }

.modal-body p,
.modal-body ul,
.modal-body li {
  font-size: .875rem;
  color: #c9d8f5;
  line-height: 1.7;
  margin-bottom: 12px;
}
.modal-body h3 {
  font-size: .9rem;
  font-weight: 700;
  color: #ffffff;
  margin: 22px 0 6px;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.modal-body ul { padding-left: 18px; }
.modal-body li { margin-bottom: 6px; }
.modal-body a  { color: var(--accent); text-decoration: underline; }

.modal-effective {
  font-size: .76rem !important;
  color: #8b949e !important;
  margin-bottom: 16px !important;
}
.modal-contact {
  margin-top: 24px !important;
  font-size: .82rem !important;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.modal-decline-btn {
  all: unset;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 9px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  background: transparent;
  transition: background .15s, color .15s;
}
.modal-decline-btn:hover { background: rgba(255,255,255,.06); color: var(--text); }

.modal-accept-btn {
  all: unset;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 9px;
  font-size: .88rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(79,142,247,.3);
  transition: background .15s, transform .12s;
}
.modal-accept-btn:hover  { background: var(--accent-hover); }
.modal-accept-btn:active { transform: scale(.97); }

/* Mobile: bottom sheet */
@media (max-width: 540px) {
  .modal-overlay   { align-items: flex-end; padding: 0; }
  .modal-container {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    max-width: 100%;
    width: 100%;
    margin: 0;
  }
  .modal-header { padding: 16px 18px 14px; }
  .modal-body   { padding: 16px 18px; }
  .modal-title  { font-size: 1rem; }
  .modal-footer { flex-direction: column-reverse; gap: 8px; padding: 14px 18px 18px; }
  .modal-accept-btn,
  .modal-decline-btn { width: 100%; text-align: center; padding: 13px 20px; }
}

/* ── Slot hold notice ────────────────────────────────── */
.slot-hold-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 11px 15px;
  border-radius: 10px;
  background: rgba(56, 189, 248, .08);
  border: 1px solid rgba(56, 189, 248, .22);
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.slot-hold-notice > span:first-child {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.slot-hold-notice strong {
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 640px) {
  .slot-hold-notice { font-size: .78rem; padding: 9px 11px; }
}

/* ═══════════════════════════════════════════════════════
   COMMITMENT / CONTACT SECTION (inside T&C modal)
═══════════════════════════════════════════════════════ */
.commitment-text {
  font-size: 14.5px;
  color: #cbd5e1;
  line-height: 1.65;
  margin-bottom: 18px;
}

.commitment-contact {
  background: linear-gradient(180deg, #111827, #0b1220);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.contact-text .title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
}

.contact-text .subtitle {
  margin: 4px 0 8px;
  font-size: 13px;
  color: #9ca3af;
}

.email-line {
  margin: 0;
  font-size: 13px;
  color: #9ca3af;
}

.email-line a {
  color: #818cf8;
  font-weight: 500;
  text-decoration: none;
}

.email-line a:hover { text-decoration: underline; }

.contact-button {
  background: rgba(79, 70, 229, 0.15);
  color: #a5b4fc;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(79, 70, 229, 0.25);
  transition: 0.2s ease;
  white-space: nowrap;
}

.contact-button:hover {
  background: rgba(79, 70, 229, 0.25);
  border-color: rgba(79, 70, 229, 0.4);
  color: #c7d2fe;
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .commitment-contact { flex-direction: column; align-items: flex-start; }
  .contact-button { width: 100%; text-align: center; }
}

/* ═══════════════════════════════════════════════════════
   SIMILAR PROVIDERS
═══════════════════════════════════════════════════════ */
.similar-providers-section {
  max-width: 100%;
  width: 100%;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.similar-providers-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1.2rem;
}

@media (max-width: 640px) {
  .similar-providers-section { margin-top: 2.2rem; padding-top: 1.4rem; }
  .similar-providers-title   { font-size: 1rem; margin-bottom: .9rem; }
}

.similar-providers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

@media (max-width: 900px) {
  .similar-providers-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .similar-providers-grid { grid-template-columns: 1fr; }
}

.similar-providers-loading {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--text-muted);
  font-size: .9rem;
  padding: 1rem 0;
}

/* ── Card shell ───────────────────────────────────────── */
.similar-provider-card {
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.similar-provider-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}

/* ── Photo ────────────────────────────────────────────── */
.similar-provider-photo-link {
  display: block;
  text-decoration: none;
}

.similar-provider-photo {
  width: 100%;
  height: 260px;
  object-fit: contain;
  object-position: 50% 50%;
  display: block;
  background: var(--surface);
}
.similar-provider-photo--fallback {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  background: linear-gradient(135deg, #1c2a44, #1a3a6a);
}

/* ── Body ─────────────────────────────────────────────── */
.similar-provider-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.similar-provider-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
}

.similar-provider-name:hover { color: var(--accent); }

.similar-provider-qual {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.similar-provider-rating {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
}

.similar-provider-rating .rating-num {
  font-size: .85rem;
}

/* ── Expertise badges ─────────────────────────────────── */
.similar-provider-expertise-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-top: .15rem;
}

.similar-provider-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}

.similar-badge {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(79,142,247,.2);
  border-radius: 20px;
  padding: .2rem .6rem;
  font-size: .72rem;
  font-weight: 600;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.similar-badge-more {
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Meta rows (languages / location) ────────────────── */
.similar-provider-meta-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── Price ────────────────────────────────────────────── */
.similar-provider-price-row {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  margin-top: .3rem;
}

.similar-provider-price-row .price {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -.02em;
}

.similar-provider-price-row .unit {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Actions ──────────────────────────────────────────── */
.similar-provider-book-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(79,142,247,.3);
  transition: box-shadow .2s, transform .15s;
  margin-top: .4rem;
}

.similar-provider-book-btn:hover {
  box-shadow: 0 6px 20px rgba(79,142,247,.45);
  transform: translateY(-1px);
}

.similar-provider-ask-btn {
  display: block;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600;
  padding: .3rem;
  cursor: pointer;
  text-decoration: none;
  transition: color .15s;
}

.similar-provider-ask-btn:hover { color: var(--accent); }

@media (max-width: 480px) {
  .similar-provider-photo,
  .similar-provider-photo--fallback { height: 200px; }
  .similar-provider-body { padding: .85rem .9rem 1rem; }
}