/*
 * Mobile-First Custom Theme for Passport Appointments
 * Professional, modern styling with mobile as priority
 */

/* ============================================
   COLOR PALETTE
   ============================================ */
:root {
  /* Primary Colors */
  --primary-color: #2185D0;
  --primary-hover: #1678c2;
  --primary-light: #e8f4fd;

  /* Secondary Colors */
  --secondary-color: #00B5AD;
  --secondary-hover: #009c95;

  /* Accent Colors */
  --accent-purple: #6435C9;
  --accent-gold: #F2C037;

  /* Status Colors */
  --success-color: #21BA45;
  --warning-color: #F2C037;
  --error-color: #DB2828;
  --info-color: #31CCEC;

  /* Neutral Colors */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F5;
  --gray-200: #EAEBEC;
  --gray-300: #DCDDDE;
  --gray-400: #C4C5C6;
  --gray-500: #9E9E9E;
  --gray-600: #767676;
  --gray-700: #4A4A4A;
  --gray-800: #2D2D2D;
  --gray-900: #1B1C1D;

  /* Spacing Scale (mobile-first) */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ============================================
   BASE STYLES (Mobile-First)
   ============================================ */
body {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container - mobile padding */
.ui.container {
  padding-left: var(--space-md) !important;
  padding-right: var(--space-md) !important;
}

/* Tablet and up */
@media (min-width: 768px) {
  .ui.container {
    padding-left: var(--space-lg) !important;
    padding-right: var(--space-lg) !important;
  }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-md);
  color: var(--gray-900);
}

h1 {
  font-size: 1.75rem;
  margin-top: var(--space-lg);
}

h2 {
  font-size: 1.5rem;
  margin-top: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--primary-light);
}

h3 {
  font-size: 1.25rem;
  margin-top: var(--space-md);
  color: var(--gray-800);
}

h4 {
  font-size: 1.1rem;
  color: var(--gray-800);
}

/* Desktop typography */
@media (min-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
}

p {
  line-height: 1.6;
  margin-bottom: var(--space-md);
  color: var(--gray-700);
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  p { font-size: 1rem; }
}

/* ============================================
   HEADER & LOGO
   ============================================ */
.logo {
  font-family: 'Arial', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1.2;
  color: #3B5998;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  display: inline-block;
  padding: var(--space-sm) 0;
  margin: var(--space-md) 0;
}

@media (min-width: 768px) {
  .logo {
    font-size: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .logo {
    font-size: 2rem;
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
.ui.menu {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: var(--space-xl) !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ui.menu .item {
  padding: 0.75rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ui.menu .item:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.ui.menu .active.item {
  background: var(--primary-color);
  color: white !important;
  font-weight: 600;
}

@media (min-width: 768px) {
  .ui.menu .item {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }
}

/* ============================================
   BUTTONS (Mobile-Optimized)
   ============================================ */
.ui.button {
  border-radius: var(--radius-md);
  font-weight: 600;
  padding: 0.875rem 1.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
  /* Mobile: full width by default for primary actions */
}

.ui.primary.button {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  box-shadow: var(--shadow-md);
}

.ui.primary.button:hover,
.ui.primary.button:focus {
  background: var(--primary-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.ui.button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Mobile: make important buttons full width */
.ui.button.primary,
button[type="submit"].ui.button.primary {
  width: 100%;
}

@media (min-width: 768px) {
  .ui.button.primary,
  button[type="submit"].ui.button.primary {
    width: auto;
  }

  .ui.button {
    font-size: 1rem;
  }
}

/* ============================================
   FORMS (Mobile-Optimized)
   ============================================ */
.ui.form .field > label {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .ui.form .field > label {
    font-size: 0.95rem;
  }
}

.ui.form input[type="text"],
.ui.form input[type="email"],
.ui.form input[type="tel"],
.ui.form input[type="date"],
.ui.form input[type="time"],
.ui.form textarea,
.ui.dropdown {
  border-radius: var(--radius-md);
  border: 2px solid var(--gray-300);
  transition: all 0.2s ease;
  font-size: 1rem; /* Prevent iOS zoom */
  padding: 0.75rem;
}

.ui.form input:focus,
.ui.form textarea:focus,
.ui.dropdown:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Mobile: stack fields vertically */
.ui.form .two.fields {
  flex-direction: column;
}

.ui.form .two.fields > .field {
  width: 100% !important;
  margin-bottom: var(--space-md);
}

/* Tablet and up: side by side */
@media (min-width: 768px) {
  .ui.form .two.fields {
    flex-direction: row;
  }

  .ui.form .two.fields > .field {
    margin-bottom: 0;
  }
}

/* ============================================
   MESSAGES (Mobile-Optimized)
   ============================================ */
.ui.message {
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .ui.message {
    padding: var(--space-lg);
    font-size: 1rem;
  }
}

.ui.info.message {
  background-color: var(--primary-light);
  border-left: 4px solid var(--info-color);
}

.ui.error.message {
  background-color: #fff6f6;
  border-left: 4px solid var(--error-color);
}

.ui.warning.message {
  background-color: #fffaf3;
  border-left: 4px solid var(--warning-color);
}

.ui.success.message {
  background-color: #fcfff5;
  border-left: 4px solid var(--success-color);
}

/* ============================================
   SEGMENTS & CARDS (Mobile-First)
   ============================================ */
.ui.segment {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  background: white;
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .ui.segment {
    padding: var(--space-xl);
  }
}

/* ============================================
   FOOTER
   ============================================ */
footer,
hr + p[style*="text-align:center"] {
  border-top: 2px solid var(--gray-200);
  padding-top: var(--space-lg);
  margin-top: var(--space-2xl);
  color: var(--gray-600);
  font-size: 0.85rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  footer,
  hr + p[style*="text-align:center"] {
    font-size: 0.9rem;
  }
}

/* ============================================
   DIVIDERS
   ============================================ */
.ui.divider,
hr {
  border-color: var(--gray-200);
  margin: var(--space-xl) 0;
}

/* ============================================
   CHECKBOXES (Mobile-Optimized)
   ============================================ */
.ui.checkbox {
  min-height: 24px;
}

.ui.toggle.checkbox {
  min-height: 28px;
}

.ui.toggle.checkbox input:checked ~ label:before {
  background-color: var(--success-color) !important;
}

/* Make checkboxes easier to tap on mobile */
.ui.checkbox label {
  padding-left: 2rem;
  cursor: pointer;
  line-height: 1.5;
  font-size: 0.95rem;
}

.ui.checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

@media (min-width: 768px) {
  .ui.checkbox label {
    font-size: 1rem;
  }
}

/* ============================================
   DROPDOWNS (Mobile-Optimized)
   ============================================ */
.ui.dropdown {
  min-height: 44px; /* iOS recommended touch target */
  font-size: 1rem;
}

.ui.dropdown > .text {
  line-height: 1.5;
}

/* ============================================
   LINKS
   ============================================ */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ============================================
   UTILITIES
   ============================================ */
.mobile-only {
  display: block;
}

.desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }

  .desktop-only {
    display: block;
  }
}

/* Touch-friendly spacing */
.touch-target {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Prevent text size adjustment on mobile */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}
/*
 * Reusable Component Styles
 * Mobile-first component library
 */

/* ============================================
   FORM SECTIONS (Card-style containers)
   ============================================ */
.form-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

@media (min-width: 768px) {
  .form-section {
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
  }
}

.form-section h3 {
  margin-top: 0;
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--gray-100);
  color: var(--gray-900);
  font-size: 1.15rem;
}

@media (min-width: 768px) {
  .form-section h3 {
    font-size: 1.35rem;
  }
}

/* ============================================
   INFO BOXES (Decision preferences, help text)
   ============================================ */
.info-box {
  background: var(--primary-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  border-left: 4px solid var(--primary-color);
  line-height: 1.6;
}

.info-box label {
  font-weight: 600;
  color: var(--gray-900);
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 0.95rem;
}

.info-box p,
.info-box label:not(:first-child) {
  color: var(--gray-700);
  font-weight: 400;
  margin: 0;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .info-box {
    padding: var(--space-lg);
  }

  .info-box label {
    font-size: 1rem;
  }

  .info-box p,
  .info-box label:not(:first-child) {
    font-size: 0.95rem;
  }
}

/* Hide info boxes by default, show with JS */
.info-box.hidden,
[id^="decision_preference_info_"].field {
  display: none;
}

.info-box.visible,
[id^="decision_preference_info_"].field.visible {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

/* ============================================
   LOCATION CARDS (Mobile-optimized, Clear Selection)
   ============================================ */

.locations-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.location-card-wrapper {
  position: relative;
}

/* Hide the actual checkbox input */
.location-checkbox-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* The clickable label that acts as the card */
.location-card-label {
  display: block;
  cursor: pointer;
  margin: 0;
  transition: all 0.3s ease;
}

.location-card-inner {
  background: white;
  border: 3px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all 0.3s ease;
  position: relative;
}

@media (min-width: 768px) {
  .location-card-inner {
    padding: var(--space-lg);
  }
}

/* Hover state */
.location-card-label:hover .location-card-inner {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* SELECTED state */
.location-checkbox-input:checked + .location-card-label .location-card-inner {
  border-color: var(--success-color);
  background: linear-gradient(to right, #f0fdf4 0%, white 100%);
  box-shadow: 0 0 0 3px rgba(33, 186, 69, 0.1);
}

.location-checkbox-input:checked + .location-card-label:hover .location-card-inner {
  box-shadow: 0 0 0 3px rgba(33, 186, 69, 0.2), var(--shadow-md);
}

/* UNSELECTED state - dimmed and gray */
.location-checkbox-input:not(:checked) + .location-card-label .location-card-inner {
  opacity: 0.5;
  background: var(--gray-50);
  border-color: var(--gray-400);
  border-style: dashed;
}

.location-checkbox-input:not(:checked) + .location-card-label:hover .location-card-inner {
  opacity: 0.7;
}

/* Strikethrough text when unselected */
.location-checkbox-input:not(:checked) + .location-card-label .content {
  text-decoration: line-through;
  text-decoration-color: var(--gray-400);
}

/* Status Badge - Left aligned */
.location-status-badge {
  position: relative;
  display: inline-block;
  font-weight: 700;
  font-size: 0.75rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

@media (min-width: 768px) {
  .location-status-badge {
    font-size: 0.85rem;
    padding: var(--space-sm) var(--space-md);
  }
}

/* Show "SELECTED" badge when checked */
.location-checkbox-input:checked + .location-card-label .status-selected {
  display: inline-block;
  background: var(--success-color);
  color: white;
}

.location-checkbox-input:checked + .location-card-label .status-unselected {
  display: none;
}

/* Show "NOT SELECTED" badge when unchecked */
.location-checkbox-input:not(:checked) + .location-card-label .status-selected {
  display: none;
}

.location-checkbox-input:not(:checked) + .location-card-label .status-unselected {
  display: inline-block;
  background: var(--gray-500);
  color: white;
}

/* Location details styling */
.location-card-inner .content {
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .location-card-inner .content {
    font-size: 0.95rem;
  }
}

.location-card-inner .content b {
  color: var(--gray-900);
  font-size: 1.05rem;
}

/* Distance badge */
.distance-badge {
  display: inline-block;
  background: var(--gray-100);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-left: var(--space-sm);
}

.distance-badge.closest {
  background: #e8f5e9;
  color: #2e7d32;
}

/* Mobile: Make it obvious these are tappable */
@media (max-width: 767px) {
  .location-card-label {
    -webkit-tap-highlight-color: rgba(33, 186, 69, 0.2);
  }
}

/* ============================================
   DAY SELECTOR (Certain Days of Week)
   ============================================ */

.day-selector {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.day-option {
  position: relative;
  flex: 0 0 auto;
}

/* Hide the actual checkbox */
.day-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Style the label as a button */
.day-label {
  display: inline-block;
  padding: 0.75rem 1rem;
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  min-width: 60px;
  user-select: none;
  color: var(--gray-700);
}

@media (min-width: 768px) {
  .day-label {
    min-width: 70px;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
  }
}

/* Hover state */
.day-label:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Selected state - works with or without field_with_errors wrapper */
.day-checkbox:checked + .day-label,
.day-option:has(.day-checkbox:checked) .day-label {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.day-checkbox:checked + .day-label:hover,
.day-option:has(.day-checkbox:checked) .day-label:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Focus state for keyboard navigation */
.day-checkbox:focus-visible + .day-label,
.day-option:has(.day-checkbox:focus-visible) .day-label {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Saturday - special styling (limited availability) */
.day-option:last-child .day-label {
  border-color: var(--warning-color);
  background: #fffaf3;
}

.day-option:last-child .day-checkbox:checked + .day-label,
.day-option:last-child:has(.day-checkbox:checked) .day-label {
  background: var(--warning-color);
  border-color: var(--warning-color);
  color: var(--gray-900);
}

.day-option:last-child .day-checkbox:checked + .day-label:hover,
.day-option:last-child:has(.day-checkbox:checked) .day-label:hover {
  background: #e6b333;
  border-color: #e6b333;
}

/* Helper text below day selector */
.day-selector-hint {
  display: block;
  color: var(--gray-600);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: var(--space-xs);
}

/* Mobile: Make days wrap nicely */
@media (max-width: 767px) {
  .day-selector {
    gap: var(--space-xs);
  }

  .day-label {
    min-width: 50px;
    padding: 0.7rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* ============================================
   FIELD GROUPS (Scheduling preferences)
   ============================================ */
.field-group {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

@media (min-width: 768px) {
  .field-group {
    padding: var(--space-lg);
  }
}

/* Hide/show containers with smooth transitions */
#specific_date_container,
#certain_days_container,
#time_window_container,
#earliest_ready_date_container {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

#specific_date_container.visible,
#certain_days_container.visible,
#time_window_container.visible,
#earliest_ready_date_container.visible {
  display: block;
}

/* ============================================
   CALL TO ACTION BUTTONS
   ============================================ */
.cta-button {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
  display: inline-block;
  margin: var(--space-md) 0;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  text-decoration: none;
  color: white;
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
  .cta-button {
    width: auto;
    min-width: 200px;
  }
}

/* ============================================
   FEATURE CARDS (Home page)
   ============================================ */
.feature-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-card h3 {
  color: var(--primary-color);
  margin-top: 0;
  font-size: 1.15rem;
}

@media (min-width: 768px) {
  .feature-card h3 {
    font-size: 1.25rem;
  }
}

/* ============================================
   PROGRESS INDICATOR (Optional for forms)
   ============================================ */
.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.progress-step {
  flex: 1;
  text-align: center;
  padding: var(--space-sm);
  background: var(--gray-100);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  min-width: 80px;
}

.progress-step.active {
  background: var(--primary-color);
  color: white;
}

.progress-step.completed {
  background: var(--success-color);
  color: white;
}

@media (min-width: 768px) {
  .progress-step {
    font-size: 0.9rem;
  }
}

/* ============================================
   PAYMENT SECTION
   ============================================ */
.payment-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

@media (min-width: 768px) {
  .payment-container {
    padding: var(--space-xl);
  }
}

.price-display {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin: var(--space-lg) 0;
}

@media (min-width: 768px) {
  .price-display {
    font-size: 2.25rem;
  }
}

/* ============================================
   TRUST BADGES
   ============================================ */
.trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  flex-wrap: wrap;
}

.trust-badge {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.trust-badge:hover {
  opacity: 1;
}

/* ============================================
   ITEM LISTS (Locations, etc.)
   ============================================ */
.ui.divided.items {
  margin-top: var(--space-md);
}

.ui.divided.items > .item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--gray-200);
}

.ui.divided.items > .item:last-child {
  border-bottom: none;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

/* Larger tap targets for mobile */
@media (max-width: 767px) {
  .ui.button,
  .ui.dropdown,
  input[type="submit"],
  button {
    min-height: 44px;
  }

  /* Stack form fields vertically on mobile */
  .ui.form .fields {
    flex-direction: column;
  }

  .ui.form .fields > .field {
    width: 100% !important;
  }

  /* Full-width inputs on mobile */
  .ui.form input[type="text"],
  .ui.form input[type="email"],
  .ui.form input[type="tel"],
  .ui.form input[type="date"],
  .ui.form input[type="time"],
  .ui.form textarea,
  .ui.dropdown {
    width: 100%;
  }
}

/* ============================================
   LOADING STATES
   ============================================ */
.ui.button[data-disable-with] {
  position: relative;
}

.ui.button.loading {
  color: transparent !important;
  pointer-events: none;
}

.ui.button.loading:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -0.5em 0 0 -0.5em;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ============================================
   REVIEW/CHECKOUT PAGE
   ============================================ */

.review-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.review-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

@media (min-width: 768px) {
  .review-card {
    padding: var(--space-xl);
  }
}

.review-section-title {
  margin: 0 0 var(--space-lg) 0;
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--gray-200);
  color: var(--primary-color);
  font-size: 1.25rem;
}

@media (min-width: 768px) {
  .review-section-title {
    font-size: 1.5rem;
  }
}

/* Definition list styling */
.review-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.review-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xs);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--gray-100);
}

@media (min-width: 768px) {
  .review-item {
    grid-template-columns: 200px 1fr;
    gap: var(--space-lg);
    align-items: baseline;
  }
}

.review-item:last-of-type {
  border-bottom: none;
}

.review-item dt {
  font-weight: 600;
  color: var(--gray-600);
  font-size: 0.9rem;
  margin: 0;
}

.review-item dd {
  margin: 0;
  color: var(--gray-900);
  font-size: 1rem;
  line-height: 1.5;
}

.review-item dd.highlight {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
}

@media (min-width: 768px) {
  .review-item dd.highlight {
    font-size: 1.15rem;
  }
}

/* Full width items (for messages) */
.review-item-full {
  margin-top: var(--space-md);
}

.review-item-full .ui.message {
  margin: 0;
}

/* Notice boxes in review page */
.review-notice {
  background: #fff4e6;
  border-left: 4px solid var(--warning-color);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: 0;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .review-notice {
    padding: var(--space-lg);
  }
}

.review-notice p {
  margin: 0;
  color: var(--gray-900);
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .review-notice p {
    font-size: 1rem;
  }
}

.review-notice strong {
  color: var(--gray-900);
  font-weight: 600;
}

/* Locations styling */
.review-zipcode {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.review-locations {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.review-location-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 2px solid var(--gray-200);
}

@media (min-width: 768px) {
  .review-location-card {
    padding: var(--space-lg);
  }
}

.location-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
}

@media (min-width: 768px) {
  .location-number {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
}

.location-details {
  flex: 1;
  min-width: 0; /* Allows text to wrap properly */
}

.location-name {
  margin: 0 0 var(--space-xs) 0;
  font-size: 1.05rem;
  color: var(--gray-900);
  font-weight: 600;
}

@media (min-width: 768px) {
  .location-name {
    font-size: 1.15rem;
  }
}

.location-address {
  margin: 0;
  color: var(--gray-700);
  font-size: 0.9rem;
  line-height: 1.5;
}

.location-address a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.location-address a:hover {
  text-decoration: underline;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus states for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   TOUCH FEEDBACK (Mobile)
   ============================================ */
.touch-active {
  opacity: 0.7;
  transform: scale(0.98);
  transition: all 0.1s ease;
}

/* Smooth transitions for interactive elements */
button,
.ui.button,
a.item,
.feature-card,
.location-card {
  transition: all 0.2s ease;
}

/* Active states */
.ui.menu .item.active {
  background: var(--primary-color) !important;
  color: white !important;
  font-weight: 600;
}

/* Improve tap target sizes on mobile */
@media (max-width: 767px) {
  .ui.menu .item {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ui.checkbox label {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *



 */

/* Legacy field error styling - enhanced */
.field_with_errors {
    color: #DB2828;
    font-weight: 600;
}

.field_with_errors input,
.field_with_errors textarea,
.field_with_errors select {
    border-color: #DB2828 !important;
    background-color: #fff6f6;
}

/* Exception: day selector checkboxes should not show error styling */
.day-option .field_with_errors {
    display: contents; /* Makes the wrapper transparent to CSS */
    color: inherit;
    font-weight: inherit;
}

span.red {
    color: #DB2828;
    font-weight: 600;
}
