/**
 * ContactUs Booking – Frontend Styles (v1.8.0)
 *
 * Calendly-inspired booking UI.
 * Flow: Calendar/Time → Details → Confirm → Success
 */

/* ───────── Reset & Container ───────── */

.contactus-booking {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5em 0;
  font-family: "Poppins", system-ui, sans-serif;
  color: #000;
  line-height: 1.5;
}

.contactus-booking *,
.contactus-booking *::before,
.contactus-booking *::after {
  box-sizing: border-box;
}

/* Force heading/text colors to override WordPress theme styles */
#contactus-booking h3,
#contactus-booking h4,
#contactus-booking .contactus-content-heading,
#contactus-booking .contactus-sidebar-title,
#contactus-booking .contactus-cal-month-label,
#contactus-booking .contactus-cal-times-date {
  color: #000 !important;
}

#contactus-booking h4 {
  font-size: 1em;
}

#contactus-booking .contactus-panel-success h3 {
  color: #059669 !important;
}

/* ═══════════════════════════════════════
   SHARED LAYOUT: SIDEBAR + CONTENT
   ═══════════════════════════════════════ */

.contactus-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  min-height: 480px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ───────── Left sidebar ───────── */

.contactus-sidebar {
  padding: 1.75em 1.5em;
  border-right: 1px solid #e5e7eb;
  background: #fafafa;
  display: flex;
  flex-direction: column;
}

.contactus-sidebar-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 0.75em;
}

.contactus-sidebar-company {
  font-size: 0.82em;
  color: #6b7280;
  margin-bottom: 0.15em;
}

.contactus-sidebar-title {
  font-size: 1.3em;
  font-weight: 700;
  margin: 0 0 0.75em;
  color: #000;
}

.contactus-sidebar-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin-bottom: 1em;
}

.contactus-sidebar-meta-item {
  display: flex;
  align-items: center;
  gap: 0.45em;
  font-size: 0.88em;
  color: #6b7280;
}

.contactus-sidebar-meta-item svg {
  flex-shrink: 0;
  color: #6b7280;
}

.contactus-sidebar-desc {
  font-size: 0.82em;
  color: #6b7280;
  line-height: 1.55;
  margin: 0;
}

/* Sidebar back button (pinned to bottom) */

.contactus-btn-sidebar-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: auto;
  padding: 0.55em 1.1em;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.85em;
  color: #374151;
  transition: all 0.15s ease;
}

.contactus-btn-sidebar-back:hover,
.contactus-btn-sidebar-back:focus-visible {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* ───────── Right content area ───────── */

.contactus-content {
  padding: 1.75em;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.contactus-content-heading {
  font-size: 1.25em;
  font-weight: 700;
  margin: 0 0 1.25em;
  color: #000;
}

/* ═══════════════════════════════════════
   PANEL: CALENDAR + TIME SLOTS
   ═══════════════════════════════════════ */

/* Loading */

.contactus-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  padding: 4em 0;
  justify-content: center;
  color: #6b7280;
}

.contactus-spinner {
  display: inline-block;
  width: 2em;
  height: 2em;
  border: 3px solid #e5e7eb;
  border-top-color: #4338ca;
  border-radius: 50%;
  animation: contactus-spin 0.7s linear infinite;
}

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

/* Calendar body: calendar grid + times always side by side */

.contactus-cal-body {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 0;
  flex: 1;
}

/* Calendar main area */

.contactus-cal-main {
  /* no extra padding needed, inherits from content */
}

.contactus-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1em;
}

.contactus-cal-month-label {
  font-size: 1em;
  font-weight: 600;
  margin: 0;
  color: #000;
}

.contactus-cal-nav {
  display: flex;
  gap: 0.5em;
}

.contactus-cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  color: #374151;
  transition: all 0.15s;
}

.contactus-cal-nav-btn:hover {
  background: #f3f4f6;
}

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

/* Weekday headers */

.contactus-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.7em;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.05em;
  margin-bottom: 0.4em;
  padding-bottom: 0.5em;
}

/* Calendar day grid */

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

.contactus-cal-day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  background: none;
  font: inherit;
  font-size: 0.88em;
  color: #d1d5db;
  cursor: default;
  transition: all 0.15s;
  padding: 0;
}

.contactus-cal-day.has-slots {
  color: #4338ca;
  font-weight: 600;
  cursor: pointer;
}

.contactus-cal-day.has-slots:hover {
  background: #ede9fe;
}

.contactus-cal-day.today {
  position: relative;
}

.contactus-cal-day.today::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4338ca;
}

.contactus-cal-day.selected {
  background: #312e81;
  color: #fff;
}

.contactus-cal-day.selected:hover {
  background: #1e1b4b;
}

.contactus-cal-day.selected.today::after {
  background: #fff;
}

.contactus-cal-day.empty {
  visibility: hidden;
}

/* Timezone (pinned to bottom of time slots column) */

.contactus-cal-tz {
  margin-top: auto;
  padding: 0.75em 1em;
  border-top: 1px solid #e5e7eb;
}

.contactus-cal-tz strong {
  display: block;
  font-size: 0.8em;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.3em;
}

.contactus-cal-tz-detail {
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.78em;
  color: #6b7280;
}

.contactus-cal-tz-detail svg {
  flex-shrink: 0;
}

/* ───────── Time slots (right column, always visible) ───────── */

.contactus-cal-times {
  border-left: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.contactus-cal-times-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 1em;
  color: #9ca3af;
  font-size: 0.85em;
  text-align: center;
}

.contactus-cal-times-date {
  font-size: 0.9em;
  font-weight: 600;
  padding: 0 1em 0.75em;
  margin: 0;
  color: #000;
}

.contactus-cal-times-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 1em 1em;
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  max-height: 340px;
  scrollbar-color: #000 #fff;
  scrollbar-width: thin;
}

.contactus-cal-times-list::-webkit-scrollbar {
  width: 8px;
  background: #fff;
}

.contactus-cal-times-list::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 4px;
}

.contactus-cal-times-list::-webkit-scrollbar-track {
  background: #fff;
}

.contactus-time-btn {
  display: block;
  width: 100%;
  padding: 0.65em 0.5em;
  border: 1.5px solid #c7d2fe;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.78em;
  font-weight: 600;
  color: #4338ca;
  text-align: center;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.contactus-time-btn:hover,
.contactus-time-btn:focus-visible {
  background: #4338ca;
  color: #fff;
  border-color: #4338ca;
}

/* ═══════════════════════════════════════
   PANEL: DETAILS FORM (white background)
   ═══════════════════════════════════════ */

.contactus-dark-form {
  background: #fff;
  border-radius: 10px;
  padding: 1.5em;
}

.contactus-dark-form .contactus-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
}

.contactus-dark-form .contactus-field {
  margin-bottom: 0;
}

.contactus-dark-form .contactus-field-full {
  margin-top: 1em;
}

.contactus-dark-form .contactus-field label {
  display: block;
  margin-bottom: 0.35em;
  font-weight: 400;
  font-size: 0.85em;
  color: #000;
}

.contactus-dark-form .contactus-field abbr[title] {
  text-decoration: none;
  color: #ef4444;
}

.contactus-dark-form .contactus-field input,
.contactus-dark-form .contactus-field textarea {
  display: block;
  width: 100%;
  padding: 0.6em 0.75em;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font: inherit;
  font-size: 0.92em;
  color: #000;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contactus-dark-form .contactus-field input:focus,
.contactus-dark-form .contactus-field textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Form actions */

.contactus-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5em;
}

/* ───────── Schedule / primary pill button ───────── */

.contactus-btn-schedule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0.7em 2em;
  border: none;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font: inherit;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.contactus-btn-schedule:hover,
.contactus-btn-schedule:focus-visible {
  background: #2563eb;
}

.contactus-btn-schedule:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════
   PANEL: CONFIRMATION
   ═══════════════════════════════════════ */

.contactus-summary-card {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 1.5em;
}

.contactus-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75em 1.15em;
  border-bottom: 1px solid #f3f4f6;
}

.contactus-summary-row:last-child {
  border-bottom: none;
}

.contactus-summary-label {
  font-size: 0.83em;
  font-weight: 400;
  color: #6b7280;
  flex-shrink: 0;
  margin-right: 1em;
}

.contactus-summary-value {
  font-size: 0.88em;
  color: #000;
  text-align: right;
}

.contactus-confirm-datetime {
  text-align: center;
  padding: 1.25em 1em;
  margin-bottom: 1.25em;
  background: #f5f3ff;
  border-radius: 10px;
  border: 1.5px solid #e0dafb;
}

.contactus-confirm-date {
  font-size: 1.05em;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25em;
}

.contactus-confirm-time {
  font-size: 1.2em;
  font-weight: 700;
  color: #4338ca;
  margin-bottom: 0.5em;
}

.contactus-confirm-tz {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.78em;
  color: #6b7280;
}

.contactus-confirm-tz svg {
  flex-shrink: 0;
}

/* Confirm actions */

.contactus-confirm-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1em;
}

/* ═══════════════════════════════════════
   PANEL: SUCCESS
   ═══════════════════════════════════════ */

.contactus-panel-success {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3em 1em;
}

.contactus-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  margin-bottom: 1em;
}

.contactus-panel-success h3 {
  font-size: 1.4em;
  color: #059669;
  margin: 0 0 0.5em;
}

.contactus-success-note {
  color: #6b7280;
  font-size: 0.88em;
  margin-top: 0.5em;
}

.contactus-panel-success .contactus-btn-schedule {
  margin-top: 1.5em;
}

/* ═══════════════════════════════════════
   ERROR MESSAGES
   ═══════════════════════════════════════ */

.contactus-calendar-error,
.contactus-booking-error {
  padding: 0.85em 1.1em;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: #991b1b;
  background: #fef2f2;
  margin-bottom: 1em;
  font-size: 0.88em;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 820px) {
  .contactus-layout {
    grid-template-columns: 1fr;
  }

  .contactus-sidebar {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25em;
  }

  .contactus-sidebar-desc {
    display: none;
  }

  .contactus-cal-body {
    grid-template-columns: 1fr;
  }

  .contactus-cal-times {
    border-left: none;
    border-top: 1px solid #e5e7eb;
    max-height: 280px;
  }

/* Meeting type selection cards */
#contactus-booking .contactus-meeting-type-cards {
  display: flex;
  gap: 2em;
  margin-top: 3em;
  justify-content: center;
  align-items: stretch;
}

#contactus-booking .contactus-meeting-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5em 3em;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s, transform 0.15s;
  min-width: 220px;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

#contactus-booking .contactus-meeting-type-card:hover {
  border-color: #312e81 !important;
  background: #ede9fe !important;
  box-shadow: 0 4px 16px rgba(49, 46, 129, 0.2) !important;
  transform: translateY(-2px);
}

#contactus-booking .contactus-meeting-type-card.selected {
  border-color: #312e81 !important;
  background: rgba(49, 46, 129, 0.05) !important;
  box-shadow: 0 0 0 3px rgba(49, 46, 129, 0.25) !important;
}

#contactus-booking .contactus-meeting-type-card-title {
  font-size: 1.15em;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.75em;
}

#contactus-booking .contactus-meeting-type-card-desc {
  font-size: 0.78em;
  font-weight: 300;
  color: #555;
  line-height: 1.55;
  text-align: center;
}

/* Dark form */
.contactus-dark-form .contactus-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .contactus-booking {
    padding: 1em 0;
  }

  .contactus-content-heading {
    font-size: 1.1em;
  }

  .contactus-cal-day {
    font-size: 0.8em;
  }

  .contactus-summary-row {
    flex-direction: column;
    gap: 0.15em;
  }

  .contactus-summary-value {
    text-align: left;
  }

  .contactus-confirm-actions {
    flex-direction: column-reverse;
  }

  .contactus-btn-schedule {
    width: 100%;
  }
}
