/* ============================================================
   JND Booking Widget CSS
   Compatible with JND design system CSS custom properties.
   All var() calls include fallback values for standalone use.
   No body/*/global resets -- page handles those.
   ============================================================ */

/* ============================================================
   1. Widget Card
   ============================================================ */

.booking-widget {
  background: var(--surface, #ffffff);
  border-radius: var(--radius, 1.25rem);
  box-shadow: var(--shadow-card, 0 4px 24px -6px rgba(0,0,0,0.07), 0 1px 4px -1px rgba(0,0,0,0.04));
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

/* ============================================================
   2. Meeting Type Step
   ============================================================ */

.meeting-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.meeting-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: var(--surface, #ffffff);
  border: 2px solid var(--border-solid, #e4e4e7);
  border-radius: var(--radius-sm, 0.75rem);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  gap: 0.5rem;
}

.meeting-type-btn:hover {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 2px 12px -3px rgba(37, 99, 235, 0.18);
}

.meeting-type-btn--selected {
  border-color: var(--accent, #2563eb);
  background: var(--accent-light, #eff6ff);
  box-shadow: 0 2px 12px -3px rgba(37, 99, 235, 0.18);
}

.meeting-type-btn svg {
  color: var(--text-muted, #71717a);
  transition: color 0.18s ease;
}

.meeting-type-btn:hover svg,
.meeting-type-btn--selected svg {
  color: var(--accent, #2563eb);
}

.meeting-type-btn-title {
  font-family: var(--font-head, 'Outfit', sans-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text, #18181b);
  margin: 0;
}

.meeting-type-btn-desc {
  font-size: 0.78rem;
  color: var(--text-muted, #71717a);
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .meeting-type-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   3. Step Header
   ============================================================ */

.step-header {
  background: var(--accent, #2563eb);
  padding: 20px 28px;
  color: #ffffff;
}

.step-header-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.back-btn {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  border-radius: 0.5rem;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
  line-height: 1.5;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.step-header-title {
  font-family: var(--font-head, 'Outfit', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.step-header-subtitle {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0.2rem 0 0 0;
}

/* ============================================================
   4. Step Body
   ============================================================ */

.step-body {
  padding: 28px;
}

/* ============================================================
   5. Calendar
   ============================================================ */

.cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.cal-nav-btn {
  background: #f1f5f9;
  border: none;
  border-radius: 0.5rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text, #18181b);
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.cal-nav-btn:hover:not(:disabled) {
  background: var(--accent, #2563eb);
  color: #ffffff;
}

.cal-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cal-month-label {
  font-family: var(--font-head, 'Outfit', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text, #18181b);
  text-align: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day-header {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #71717a);
  text-align: center;
  padding: 0.25rem 0;
  font-weight: 600;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid transparent;
  background: transparent;
  color: var(--text, #18181b);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  -webkit-user-select: none;
  user-select: none;
}

.cal-day:hover:not(.cal-day--disabled):not(.cal-day--selected) {
  background: var(--accent-light, #eff6ff);
  border-color: var(--accent, #2563eb);
}

.cal-day--empty {
  cursor: default;
  pointer-events: none;
}

.cal-day--disabled {
  color: #d1d5db;
  cursor: not-allowed;
  pointer-events: none;
}

.cal-day--today:not(.cal-day--selected):not(.cal-day--disabled) {
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
  font-weight: 700;
}

.cal-day--selected {
  background: var(--accent, #2563eb);
  color: #ffffff;
  font-weight: 700;
  border-color: var(--accent, #2563eb);
}

/* ============================================================
   6. Loading Spinner
   ============================================================ */

.spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  color: var(--text-muted, #71717a);
  font-size: 0.875rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e4e4e7;
  border-top-color: var(--accent, #2563eb);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

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

/* ============================================================
   7. Time Slots
   ============================================================ */

.slots-group-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted, #71717a);
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

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

.slot-btn {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border-solid, #e4e4e7);
  border-radius: 50px;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text, #18181b);
  padding: 0.55rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.slot-btn:hover:not(.slot-btn--selected) {
  border-color: var(--accent, #2563eb);
  background: var(--accent-light, #eff6ff);
  color: var(--accent, #2563eb);
}

.slot-btn--selected {
  background: var(--accent, #2563eb);
  border-color: var(--accent, #2563eb);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px -2px rgba(37, 99, 235, 0.35);
}

.no-slots-msg {
  text-align: center;
  color: var(--text-muted, #71717a);
  padding: 1.5rem 0.5rem;
  font-size: 0.875rem;
}

/* ============================================================
   8. Custom Time Picker
   ============================================================ */

.custom-time-section {
  margin-top: 28px;
  padding-top: 24px;
}

.custom-time-divider {
  position: relative;
  text-align: center;
  margin-bottom: 0.75rem;
}

.custom-time-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-solid, #e4e4e7);
  transform: translateY(-50%);
}

.custom-time-divider span {
  position: relative;
  background: var(--surface, #ffffff);
  padding: 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #71717a);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.custom-time-sub {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted, #71717a);
  margin: 0.4rem 0 0.85rem 0;
}

.custom-time-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.custom-time-inputs {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
}

.custom-time-select {
  border: 1.5px solid var(--border-solid, #e4e4e7);
  border-radius: 0.5rem;
  background: var(--surface, #ffffff);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text, #18181b);
  padding: 0.4rem 0.35rem;
  min-width: 52px;
  text-align: center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-time-select:focus {
  outline: none;
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.custom-time-colon {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-muted, #71717a);
  line-height: 1;
}

.check-time-btn {
  background: var(--accent, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.check-time-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -3px rgba(37, 99, 235, 0.4);
}

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

.custom-time-result {
  text-align: center;
  margin-top: 0.75rem;
  min-height: 1.5rem;
  font-size: 0.875rem;
}

.custom-time-available {
  color: #16a34a;
}

.custom-time-unavailable {
  color: #92400e;
}

.custom-time-check {
  color: #16a34a;
  font-weight: 700;
}

.custom-time-x {
  color: #dc2626;
  font-weight: 700;
}

.custom-time-book-btn {
  display: inline-block;
  background: var(--accent, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: opacity 0.15s ease;
}

.custom-time-book-btn:hover {
  opacity: 0.88;
}

.custom-time-suggest-btn {
  display: inline-block;
  background: transparent;
  color: var(--accent, #2563eb);
  border: 1.5px solid var(--accent, #2563eb);
  border-radius: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.33rem 0.82rem;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.custom-time-suggest-btn:hover {
  background: var(--accent, #2563eb);
  color: #ffffff;
}

/* ============================================================
   9. Form
   ============================================================ */

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.35rem;
}

.form-label .req {
  color: var(--accent, #2563eb);
}

.form-input,
.form-textarea {
  display: block;
  width: 100%;
  border: 1.5px solid var(--border-solid, #e4e4e7);
  border-radius: var(--radius-sm, 0.75rem);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.9rem;
  color: var(--text, #18181b);
  background: var(--surface, #ffffff);
  padding: 10px 14px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.captcha-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.captcha-label {
  display: inline-block;
  margin: 0;
}

.captcha-question {
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text, #18181b);
}

.captcha-input {
  width: 72px;
  text-align: center;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--accent, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm, 0.75rem);
  font-family: var(--font-head, 'Outfit', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.submit-btn:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: 0 4px 16px -4px rgba(37, 99, 235, 0.45);
}

.submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

.form-error {
  display: none;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #b91c1c;
  border-radius: var(--radius-sm, 0.75rem);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 18px;
}

.form-error.visible {
  display: block;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border-solid, #e4e4e7);
  margin: 20px 0;
}

/* ============================================================
   10. Selection Summary
   ============================================================ */

.selection-summary {
  background: var(--bg, #fafafa);
  border: 1.5px solid var(--border-solid, #e4e4e7);
  border-radius: var(--radius-sm, 0.75rem);
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 20px;
}

.selection-summary-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.selection-summary-text {
  font-size: 0.88rem;
  color: #374151;
  line-height: 1.5;
  margin: 0;
}

.selection-summary-text strong {
  color: var(--text, #18181b);
  font-weight: 600;
}

/* ============================================================
   11. Confirmation
   ============================================================ */

.confirm-card {
  padding: 40px 28px;
  text-align: center;
}

.confirm-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 4px 18px -4px rgba(34, 197, 94, 0.5);
}

.confirm-icon svg {
  width: 36px;
  height: 36px;
  stroke: #ffffff;
  stroke-width: 3;
  fill: none;
}

.confirm-title {
  font-family: var(--font-head, 'Outfit', sans-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text, #18181b);
  margin: 0 0 0.5rem 0;
}

.confirm-datetime {
  background: var(--bg, #fafafa);
  border: 1.5px solid var(--border-solid, #e4e4e7);
  border-radius: var(--radius-sm, 0.75rem);
  padding: 1rem 1.125rem;
  text-align: left;
  margin: 1rem 0;
}

.confirm-datetime-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #374151;
}

.confirm-datetime-row + .confirm-datetime-row {
  margin-top: 8px;
}

.confirm-email-note {
  font-size: 0.88rem;
  color: #6b7280;
  margin: 0.5rem 0;
}

.confirm-note {
  font-size: 0.85rem;
  color: var(--text-muted, #71717a);
  margin: 0.5rem 0 0 0;
}

.confirm-note a {
  color: var(--accent, #2563eb);
  text-decoration: none;
}

.confirm-note a:hover {
  text-decoration: underline;
}

/* ============================================================
   12. Contact Tabs (for index.html embedding)
   ============================================================ */

.contact-tabs {
  display: flex;
  flex-direction: row;
  border-bottom: 1px solid var(--border-solid, #e4e4e7);
}

.contact-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-head, 'Outfit', sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted, #71717a);
  cursor: pointer;
  text-align: center;
  transition: color 0.15s ease, border-color 0.15s ease;
  margin-bottom: -1px;
}

.contact-tab:hover {
  color: var(--text, #18181b);
}

.contact-tab.active {
  color: var(--accent, #2563eb);
  border-bottom-color: var(--accent, #2563eb);
}

.contact-tab-panel {
  display: none;
}

.contact-tab-panel.active {
  display: block;
}

/* ============================================================
   13. Utility
   ============================================================ */

.hidden {
  display: none !important;
}
