/**
 * AAA Availability - Front-End Styles (v2.0)
 * Designed for Ability Action Australia
 * Modern, accessible, brand-aligned, responsive UI/UX
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
  /* Brand Colors */
  --aaa-berry: #d70761;
  --aaa-berry-hover: #b50550;
  --aaa-berry-light: #fdf2f7;
  --aaa-berry-ring: rgba(215, 7, 97, 0.2);
  --aaa-navy: #001C42;
  --aaa-navy-light: #0a2f64;
  --aaa-orange: #e07e27;
  --aaa-orange-light: #fff7ed;

  /* Neutrals & Text */
  --aaa-bg: #f8fafc;
  --aaa-surface: #ffffff;
  --aaa-text-main: #0f172a;
  --aaa-text-muted: #64748b;
  --aaa-text-light: #94a3b8;
  --aaa-border: #e2e8f0;
  --aaa-border-focus: #d70761;

  /* Simplified Availability Status Palette */
  /* 0-4 weeks: Immediate availability - Richer, darker true green */
  --aaa-imm-text: #14532d;
  --aaa-imm-bg: #dcfce7;
  --aaa-imm-border: #86efac;
  --aaa-imm-dot: #16a34a;

  /* 4-8 weeks: Upcoming availability - Calmer Teal-Green */
  --aaa-book-text: #0f766e;
  --aaa-book-bg: #f0fdfa;
  --aaa-book-border: #99f6e4;
  --aaa-book-dot: #0d9488;

  /* Waitlist: Contact us to discuss upcoming availability */
  --aaa-wait-text: #5b21b6;
  --aaa-wait-bg: #f5f3ff;
  --aaa-wait-border: #ddd6fe;
  --aaa-wait-dot: #7c3aed;

  /* Telehealth available */
  --aaa-tele-text: #0e7490;
  --aaa-tele-bg: #ecfeff;
  --aaa-tele-border: #a5f3fc;
  --aaa-tele-dot: #06b6d4;

  /* Radii & Shadows */
  --aaa-radius-sm: 8px;
  --aaa-radius-md: 12px;
  --aaa-radius-lg: 18px;
  --aaa-radius-full: 9999px;
  --aaa-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --aaa-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --aaa-shadow-lg: 0 10px 25px -5px rgba(0, 28, 66, 0.08), 0 8px 10px -6px rgba(0, 28, 66, 0.04);
  --aaa-shadow-hover: 0 14px 30px -4px rgba(215, 7, 97, 0.12), 0 8px 14px -3px rgba(0, 28, 66, 0.06);
}

/* Reset within container */
.aaa-avail-container {
  width: 100%;
  max-width: 1240px;
  margin: 30px auto;
  padding: 0 16px;
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  color: var(--aaa-text-main);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.aaa-avail-container *,
.aaa-avail-container *::before,
.aaa-avail-container *::after {
  box-sizing: border-box;
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
}

.aaa-avail-container input,
.aaa-avail-container select,
.aaa-avail-container button,
.aaa-avail-container textarea,
.aaa-avail-container optgroup,
.aaa-avail-container option {
  font-family: 'Poppins', Arial, Helvetica, sans-serif !important;
}

/* ==========================================================
   HERO HEADER & STEP TRACKER
   ========================================================== */
.aaa-avail-hero {
  text-align: center;
  margin-bottom: 28px;
}

.aaa-avail-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background-color: var(--aaa-berry-light);
  color: var(--aaa-berry);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--aaa-radius-full);
  margin-bottom: 12px;
}

.aaa-avail-hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--aaa-berry);
  animation: aaaPulseDot 2s infinite ease-in-out;
}

.aaa-avail-hero-title {
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--aaa-navy);
  margin: 0 0 10px 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.aaa-avail-hero-subtitle {
  font-size: 1.05rem;
  color: var(--aaa-text-muted);
  max-width: 680px;
  margin: 0 auto 24px auto;
  line-height: 1.5;
}

/* Step Journey Tracker */
.aaa-journey-tracker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 620px;
  margin: 0 auto;
}

.aaa-journey-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--aaa-text-light);
  transition: all 0.25s ease;
}

.aaa-journey-step .step-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: #f1f5f9;
  border: 1px solid var(--aaa-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--aaa-text-muted);
  transition: all 0.25s ease;
}

.aaa-journey-step.active {
  color: var(--aaa-navy);
}

.aaa-journey-step.active .step-num {
  background-color: var(--aaa-berry);
  border-color: var(--aaa-berry);
  color: #ffffff;
  box-shadow: 0 0 0 3px var(--aaa-berry-ring);
}

.aaa-journey-step.done {
  color: var(--aaa-imm-text);
}

.aaa-journey-step.done .step-num {
  background-color: var(--aaa-imm-bg);
  border-color: var(--aaa-imm-border);
  color: var(--aaa-imm-text);
}

.step-divider {
  flex: 1;
  height: 2px;
  background-color: var(--aaa-border);
  max-width: 48px;
}

/* ==========================================================
   SEARCH & FILTER PANEL (STEPS 1 & 2)
   ========================================================== */
.aaa-search-panel {
  background-color: var(--aaa-surface);
  border: 1px solid var(--aaa-border);
  border-radius: var(--aaa-radius-lg);
  box-shadow: var(--aaa-shadow-lg);
  padding: 24px;
  margin-bottom: 48px;
  position: relative;
}

.aaa-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: flex-start;
}

.aaa-panel-col {
  position: relative;
}

.aaa-col-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  height: 24px;
  cursor: pointer;
}

.label-step-badge {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--aaa-navy);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.label-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--aaa-navy);
}

/* Postcode Input Box */
.aaa-input-postcode-wrap {
  position: relative;
}

.input-inner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 2px solid var(--aaa-border);
  border-radius: var(--aaa-radius-md);
  padding: 0 8px 0 14px;
  height: 52px !important;
  min-height: 52px !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease;
}

.input-inner.loading {
  border-color: var(--aaa-border-focus);
  box-shadow: 0 0 0 3px var(--aaa-berry-ring);
}

.input-inner:focus-within {
  border-color: var(--aaa-border-focus);
  box-shadow: 0 0 0 3px var(--aaa-berry-ring);
}

.input-icon {
  width: 20px;
  height: 20px;
  color: var(--aaa-berry);
  margin-right: 10px;
  flex-shrink: 0;
}

.aaa-postcode-field,
input.aaa-postcode-field,
#aaa-input-postcode {
  flex: 1 1 0%;
  min-width: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 1rem;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  background: transparent;
  padding: 0 !important;
  height: 100% !important;
  line-height: 48px !important;
  font-weight: 500;
}

/* Placeholder styling - separated into individual rules so browsers do not drop vendor prefixes */
#aaa-input-postcode::placeholder,
.aaa-postcode-field::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1 !important;
  font-weight: 400;
}

#aaa-input-postcode::-webkit-input-placeholder,
.aaa-postcode-field::-webkit-input-placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1 !important;
  font-weight: 400;
}

#aaa-input-postcode::-moz-placeholder,
.aaa-postcode-field::-moz-placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
  font-weight: 400;
}

#aaa-input-postcode:-ms-input-placeholder,
.aaa-postcode-field:-ms-input-placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
  font-weight: 400;
}

.input-clear-btn,
button.input-clear-btn,
#aaa-postcode-clear {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--aaa-text-light) !important;
  cursor: pointer;
  padding: 0 6px !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  line-height: 1 !important;
  text-transform: none !important;
  border-radius: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: scale(1);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease !important;
  vertical-align: middle;
  -webkit-appearance: none;
  appearance: none;
}

.input-clear-btn:hover,
.input-clear-btn:focus,
.input-clear-btn:active,
button.input-clear-btn:hover,
button.input-clear-btn:focus,
button.input-clear-btn:active,
#aaa-postcode-clear:hover,
#aaa-postcode-clear:focus,
#aaa-postcode-clear:active {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  color: var(--aaa-text-main) !important;
  transform: scale(1.25);
}

.btn-detect-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #f1f5f9;
  border: 1px solid var(--aaa-border);
  color: var(--aaa-navy);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--aaa-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-detect-location svg {
  width: 17px;
  height: 17px;
  color: var(--aaa-berry);
}

.btn-detect-location .btn-detect-icon {
  fill: currentColor !important;
  stroke: none !important;
  flex-shrink: 0;
}

.btn-detect-location .btn-detect-spinner {
  display: none;
  width: 17px;
  height: 17px;
  animation: aaaSpin 0.75s linear infinite;
  color: var(--aaa-berry);
  stroke: currentColor;
}

.btn-detect-location:hover,
.btn-detect-location:focus {
  background-color: var(--aaa-berry) !important;
  color: #ffffff !important;
  border-color: var(--aaa-berry) !important;
}

.btn-detect-location:hover span,
.btn-detect-location:focus span,
.btn-detect-location:hover .btn-detect-text,
.btn-detect-location:focus .btn-detect-text {
  color: #ffffff !important;
}

.btn-detect-location:hover svg,
.btn-detect-location:focus svg {
  color: #ffffff !important;
}

.btn-detect-location:hover .btn-detect-icon,
.btn-detect-location:focus .btn-detect-icon {
  fill: #ffffff !important;
  stroke: none !important;
}

.btn-detect-location.loading {
  opacity: 1 !important;
  pointer-events: none;
  background-color: #ffffff !important;
  border-color: var(--aaa-berry) !important;
  color: var(--aaa-berry) !important;
  box-shadow: 0 1px 3px rgba(215, 7, 97, 0.15);
  cursor: wait;
}

.btn-detect-location.loading .btn-detect-icon {
  display: none !important;
}

.btn-detect-location.loading .btn-detect-spinner {
  display: inline-block !important;
  color: var(--aaa-berry) !important;
  stroke: var(--aaa-berry) !important;
}

.btn-detect-location.loading .btn-detect-text {
  color: var(--aaa-berry) !important;
}

/* Full-Width Quick Chips (Postcode Suggestions) */
.aaa-quick-chips-wrap {
  display: none !important;
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed var(--aaa-border);
}

.aaa-quick-chips-wrap.is-hidden {
  display: none !important;
}

.aaa-quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
}

.quick-chips-label {
  font-size: 0.82rem;
  color: var(--aaa-text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.quick-chip {
  background: #f8fafc;
  border: 1px solid var(--aaa-border);
  border-radius: var(--aaa-radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--aaa-navy);
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.quick-chip:hover,
.quick-chip:focus {
  background-color: var(--aaa-berry) !important;
  border-color: var(--aaa-berry) !important;
  color: #ffffff !important;
}

/* Autocomplete Suggestions Dropdown */
.aaa-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: #ffffff;
  border: 1px solid var(--aaa-border);
  border-radius: var(--aaa-radius-md);
  box-shadow: 0 12px 28px rgba(0, 28, 66, 0.14);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
}

.aaa-autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.aaa-autocomplete-item:last-child {
  border-bottom: none;
}

.aaa-autocomplete-item:hover,
.aaa-autocomplete-item.selected {
  background-color: #f8fafc;
}

.item-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.item-pin {
  width: 16px;
  height: 16px;
  color: var(--aaa-berry);
  flex-shrink: 0;
}

.item-name {
  color: var(--aaa-navy);
  font-size: 0.92rem;
}

.item-state-pc {
  font-size: 0.85rem;
  color: var(--aaa-text-muted);
}

.item-sub {
  font-size: 0.78rem;
  color: var(--aaa-text-light);
  margin-top: 2px;
}

.item-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--aaa-radius-full);
  white-space: nowrap;
}

.item-badge--inperson {
  background-color: var(--aaa-imm-bg);
  color: var(--aaa-imm-text);
  border: 1px solid var(--aaa-imm-border);
}

.item-badge--telehealth {
  background-color: var(--aaa-tele-bg);
  color: var(--aaa-tele-text);
  border: 1px solid var(--aaa-tele-border);
}

.aaa-dropdown-loading,
.aaa-dropdown-empty {
  padding: 14px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--aaa-text-muted);
}

/* Active Location Confirmed Card */
.aaa-active-location-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
  border: 2px solid var(--aaa-imm-border);
  border-radius: var(--aaa-radius-md);
  gap: 12px;
}

.location-details {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.location-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid var(--aaa-imm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aaa-imm-text);
  flex-shrink: 0;
}

.location-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.location-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
}

.location-postcode {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--aaa-navy);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-region {
  display: none !important;
}

.aaa-btn-change-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #ffffff;
  border: 1px solid var(--aaa-border);
  color: var(--aaa-navy);
  font-size: 0.8rem;
  font-weight: 600;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--aaa-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.aaa-btn-change-location svg {
  width: 13px;
  height: 13px;
  color: var(--aaa-berry);
}

.aaa-btn-change-location:hover,
.aaa-btn-change-location:focus {
  background-color: var(--aaa-berry) !important;
  border-color: var(--aaa-berry) !important;
  color: #ffffff !important;
}

.aaa-btn-change-location:hover span,
.aaa-btn-change-location:focus span {
  color: #ffffff !important;
}

.aaa-btn-change-location:hover svg,
.aaa-btn-change-location:focus svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Step 2: Category Selector */
.aaa-select-service-wrap {
  position: relative;
}

.aaa-service-select {
  width: 100%;
  height: 52px !important;
  min-height: 52px !important;
  box-sizing: border-box !important;
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  border: 2px solid var(--aaa-border);
  border-radius: var(--aaa-radius-md);
  padding: 0 40px 0 14px !important;
  font-size: 0.98rem;
  font-weight: 400 !important;
  color: var(--aaa-navy);
  cursor: pointer;
  outline: none;
  line-height: 48px !important;
  transition: all 0.2s ease;
}

.aaa-service-select option {
  font-weight: 400 !important;
}

.aaa-service-select:focus {
  border-color: var(--aaa-border-focus);
  box-shadow: 0 0 0 3px var(--aaa-berry-ring);
}

.select-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--aaa-text-muted);
  pointer-events: none;
}

/* Category Quick Filter Pills */
.aaa-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.category-pill {
  background: #f8fafc;
  border: 1px solid var(--aaa-border);
  border-radius: var(--aaa-radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--aaa-navy);
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-pill .pill-count {
  background-color: rgba(0, 28, 66, 0.08);
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 10px;
}

.category-pill:hover {
  background-color: var(--aaa-berry-light);
  border-color: var(--aaa-berry);
  color: var(--aaa-berry);
}

.category-pill.active {
  background-color: var(--aaa-navy);
  border-color: var(--aaa-navy);
  color: #ffffff;
}

.category-pill.active .pill-count {
  background-color: var(--aaa-berry);
  color: #ffffff;
}

/* ==========================================================
   AVAILABILITY STATUS LEGEND BAR (COLLAPSIBLE)
   ========================================================== */
.aaa-legend-bar {
  display: none !important;
}

.legend-header-toggle,
.legend-header-toggle:hover,
.legend-header-toggle:focus,
.legend-header-toggle:active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit !important;
  user-select: none;
}

.legend-header-toggle:focus-visible {
  outline: 2px solid var(--aaa-navy);
  outline-offset: 4px;
  border-radius: var(--aaa-radius-sm);
}

.legend-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-info-icon {
  width: 16px;
  height: 16px;
  color: var(--aaa-navy);
  opacity: 0.9;
  flex-shrink: 0;
  display: block;
}

.legend-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--aaa-navy) !important;
  letter-spacing: -0.01em;
}

.legend-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--aaa-navy);
  background-color: #ffffff;
  border: 1px solid var(--aaa-border);
  padding: 3px 10px;
  border-radius: var(--aaa-radius-full);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.legend-header-toggle:hover .legend-toggle-pill,
.legend-header-toggle:focus .legend-toggle-pill {
  border-color: var(--aaa-navy);
  color: var(--aaa-navy);
  background-color: #f1f5f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.legend-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.25s ease;
}

/* When collapsed */
.aaa-legend-bar.is-collapsed {
  padding: 11px 20px;
  gap: 0;
}

.aaa-legend-bar.is-collapsed .legend-chevron {
  transform: rotate(180deg);
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--aaa-radius-full);
}

.legend-pill .legend-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-pill .legend-timing {
  font-size: 0.76rem;
  opacity: 0.85;
}

/* Legend Pill Themes */
.legend-pill.status-immediate {
  background-color: var(--aaa-imm-bg);
  border: 1px solid var(--aaa-imm-border);
  color: var(--aaa-imm-text);
}

.legend-pill.status-immediate .legend-indicator {
  background-color: var(--aaa-imm-dot);
}

.legend-pill.status-book-ahead {
  background-color: var(--aaa-book-bg);
  border: 1px solid var(--aaa-book-border);
  color: var(--aaa-book-text);
}

.legend-pill.status-book-ahead .legend-indicator {
  background-color: var(--aaa-book-dot);
}

.legend-pill.status-waitlist {
  background-color: var(--aaa-wait-bg);
  border: 1px solid var(--aaa-wait-border);
  color: var(--aaa-wait-text);
}

.legend-pill.status-waitlist .legend-indicator {
  background-color: var(--aaa-wait-dot);
}

.legend-pill.status-telehealth {
  background-color: var(--aaa-tele-bg);
  border: 1px solid var(--aaa-tele-border);
  color: var(--aaa-tele-text);
}

.legend-pill.status-telehealth .legend-indicator {
  background-color: var(--aaa-tele-dot);
}

/* ==========================================================
   PROMPT & LOADING STATES
   ========================================================== */
.aaa-prompt-state {
  text-align: center;
  padding: 48px 24px;
  background-color: #ffffff;
  border: 2px dashed var(--aaa-border);
  border-radius: var(--aaa-radius-lg);
  margin-bottom: 24px;
}

.prompt-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--aaa-berry-light);
  color: var(--aaa-berry);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.prompt-icon svg {
  width: 28px;
  height: 28px;
}

.aaa-prompt-state h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--aaa-navy);
  margin: 0 0 8px 0;
}

.aaa-prompt-state p {
  font-size: 0.95rem;
  color: var(--aaa-text-muted);
  max-width: 575px;
  margin: 0 auto;
  line-height: 1.5;
}

.aaa-loading-state {
  text-align: center;
  padding: 40px;
}

.aaa-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--aaa-border);
  border-top-color: var(--aaa-berry);
  border-radius: 50%;
  margin: 0 auto 12px auto;
  animation: aaaSpin 0.75s linear infinite;
}

/* ==========================================================
   STEP 3: RESULTS SECTION & SERVICE CARDS
   ========================================================== */
.aaa-results-section {
  margin-bottom: 30px;
}

.aaa-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 0;
  border-bottom: none;
}

.results-heading {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--aaa-berry) !important;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.results-subheading {
  font-size: 0.92rem;
  color: var(--aaa-text-muted);
  margin: 0;
}



/* ==========================================================
   CATEGORY CARDS & SUBSERVICES ACCORDION
   ========================================================== */

/* Container for Category Cards */
.aaa-services-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

/* Main Category Full-width Card */
.aaa-category-card {
  background-color: var(--aaa-surface);
  border: 1px solid var(--aaa-border);
  border-radius: var(--aaa-radius-lg);
  box-shadow: none !important;
  padding: 20px 24px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  position: relative;
  cursor: pointer;
}

.aaa-category-card:hover {
  border-color: #cbd5e1;
  background-color: #f7f7f7;
}

.aaa-category-card.is-expanded,
.aaa-category-card.is-expanded:hover {
  background-color: var(--aaa-border) !important;
  border-color: #cbd5e1;
}

.aaa-category-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  user-select: none;
}

.aaa-category-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
}

.aaa-category-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--aaa-navy);
  margin: 0;
  line-height: 1.3;
}

.aaa-category-meta-row {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
}

.aaa-category-meta-row .aaa-badge {
  font-weight: 600;
  font-size: 13px !important;
}

.aaa-category-count-badge {
  display: inline-flex;
  align-items: center;
  font-size: 13px !important;
  font-weight: 600;
  color: var(--aaa-berry);
  background-color: var(--aaa-berry-light);
  padding: 3px 10px;
  border-radius: var(--aaa-radius-full);
  line-height: 1.25;
}


/* Action Buttons on Category Header */
.aaa-category-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.card-btn-learn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #f8fafc;
  color: var(--aaa-navy) !important;
  border: 1px solid var(--aaa-border);
  font-size: 14px !important;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.35;
  box-shadow: none !important;
  font-family: inherit;
  width: 140px;
  min-width: 140px;
  box-sizing: border-box;
  text-align: center;
}

.card-btn-learn-more .learn-more-label {
  display: inline-block;
  text-align: center;
}

.card-btn-learn-more:hover .learn-more-chevron,
.card-btn-learn-more:focus .learn-more-chevron {
  stroke: #ffffff;
}

.learn-more-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  stroke: currentColor;
  flex-shrink: 0;
}

.aaa-category-card.is-expanded .learn-more-chevron {
  transform: rotate(180deg);
}

.aaa-category-card.is-expanded .card-btn-learn-more {
  background-color: #ffffff;
  border-color: #cbd5e1;
}

/* Desktop Only: Highlight Learn More button on mouse hover */
@media (min-width: 901px) {

  .aaa-category-card:hover .card-btn-learn-more,
  .card-btn-learn-more:hover,
  .card-btn-learn-more:focus {
    background-color: var(--aaa-navy) !important;
    border-color: var(--aaa-navy) !important;
    color: #ffffff !important;
  }

  .aaa-category-card:hover .card-btn-learn-more .learn-more-chevron,
  .card-btn-learn-more:hover .learn-more-chevron,
  .card-btn-learn-more:focus .learn-more-chevron {
    stroke: #ffffff !important;
  }

  /* When specifically hovering over referral or phone buttons, do not highlight learn more */
  .aaa-category-actions .card-btn-cta:hover~.card-btn-learn-more,
  .aaa-category-actions .card-btn-call:hover~.card-btn-learn-more {
    background-color: #f8fafc !important;
    border-color: var(--aaa-border) !important;
    color: var(--aaa-navy) !important;
  }

  .aaa-category-actions .card-btn-cta:hover~.card-btn-learn-more .learn-more-chevron,
  .aaa-category-actions .card-btn-call:hover~.card-btn-learn-more .learn-more-chevron {
    stroke: currentColor !important;
  }
}

/* Collapsible Subservices Area */
.aaa-category-subservices {
  margin-top: 18px;
  padding-top: 18px;
  border-top: none;
  cursor: default;
}

/* Subservices Grid - 2 columns */
.aaa-subservices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Subservice Card inside the 2-column grid */
.aaa-subservice-card {
  background-color: #ffffff;
  border: none;
  border-radius: var(--aaa-radius-md);
  box-shadow: none !important;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease;
  position: relative;
}

.aaa-subservice-card:hover {
  background-color: #fafbfc;
}

.aaa-subservice-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.aaa-subservice-card .card-service-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--aaa-navy);
  margin: 0 0 14px 0;
  line-height: 1.38;
}

.aaa-subservice-card .card-badges-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  margin-top: auto;
}

/* Subservices Footer Fine Print */
.aaa-subservices-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: none;
}

.aaa-subservices-fineprint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #334155;
  font-weight: 500;
}

.aaa-subservices-fineprint .fineprint-icon {
  width: 16px;
  height: 16px;
  color: #334155;
  stroke-width: 2.6;
  flex-shrink: 0;
  margin-top: 1px;
}

.card-header,
.card-category-tag,
.aaa-subservice-card .card-header,
.aaa-subservice-card .card-category-tag {
  display: none !important;
}


.card-service-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--aaa-navy);
  margin: 0 0 16px 0;
  line-height: 1.38;
}

/* Badges Row */
.card-badges-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.aaa-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px !important;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
  width: fit-content;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

a.aaa-badge {
  text-decoration: none !important;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

a.aaa-badge:hover,
a.aaa-badge:focus-visible {
  text-decoration: none !important;
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

a.aaa-badge:active {
  transform: translateY(0);
  box-shadow: none;
}

a.aaa-badge.badge-immediate,
a.aaa-badge.badge-immediate:hover,
a.aaa-badge.badge-immediate:focus,
a.aaa-badge.badge-immediate:visited {
  color: var(--aaa-imm-text) !important;
  text-decoration: none !important;
}

a.aaa-badge.badge-book-ahead,
a.aaa-badge.badge-book_ahead,
a.aaa-badge.badge-book-ahead:hover,
a.aaa-badge.badge-book_ahead:hover,
a.aaa-badge.badge-book-ahead:focus,
a.aaa-badge.badge-book_ahead:focus,
a.aaa-badge.badge-book-ahead:visited,
a.aaa-badge.badge-book_ahead:visited {
  color: var(--aaa-book-text) !important;
  text-decoration: none !important;
}

a.aaa-badge.badge-waitlist,
a.aaa-badge.badge-waitlist:hover,
a.aaa-badge.badge-waitlist:focus,
a.aaa-badge.badge-waitlist:visited {
  color: var(--aaa-wait-text) !important;
  text-decoration: none !important;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Badge Color Variations */
.badge-immediate {
  background-color: var(--aaa-imm-bg);
  color: var(--aaa-imm-text);
  border: 1px solid var(--aaa-imm-border);
}

.badge-immediate .badge-dot {
  background-color: var(--aaa-imm-dot);
}

.badge-immediate .badge-dot.pulse {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: aaaPulseDot 1.8s infinite;
}

.badge-book-ahead,
.badge-book_ahead {
  background-color: var(--aaa-book-bg);
  color: var(--aaa-book-text);
  border: 1px solid var(--aaa-book-border);
}

.badge-book-ahead .badge-dot,
.badge-book_ahead .badge-dot {
  background-color: var(--aaa-book-dot);
}

.badge-waitlist {
  background-color: var(--aaa-wait-bg);
  color: var(--aaa-wait-text);
  border: 1px solid var(--aaa-wait-border);
}

.badge-waitlist .badge-dot {
  background-color: var(--aaa-wait-dot);
}

.badge-immediate .badge-action-link,
.badge-immediate a.badge-action-link {
  color: var(--aaa-imm-text) !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.badge-immediate .badge-action-link:hover,
.badge-immediate .badge-action-link:focus,
.badge-immediate a.badge-action-link:hover,
.badge-immediate a.badge-action-link:focus {
  color: #064e3b !important;
  opacity: 0.85;
}

.badge-book-ahead .badge-action-link,
.badge-book-ahead a.badge-action-link,
.badge-book_ahead .badge-action-link,
.badge-book_ahead a.badge-action-link {
  color: var(--aaa-book-text) !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.badge-book-ahead .badge-action-link:hover,
.badge-book-ahead .badge-action-link:focus,
.badge-book_ahead .badge-action-link:hover,
.badge-book_ahead .badge-action-link:focus {
  color: #115e59 !important;
  opacity: 0.85;
}

.badge-waitlist .badge-action-link,
.badge-waitlist a.badge-action-link,
.badge-waitlist .badge-contact-link,
.badge-waitlist a.badge-contact-link {
  color: var(--aaa-wait-text) !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.badge-waitlist .badge-action-link:hover,
.badge-waitlist .badge-action-link:focus,
.badge-waitlist a.badge-contact-link:hover,
.badge-waitlist a.badge-contact-link:focus {
  color: #3b0764 !important;
  text-decoration: underline !important;
  opacity: 0.85;
}

.badge-telehealth {
  background-color: var(--aaa-tele-bg);
  color: var(--aaa-tele-text);
  border: 1px solid var(--aaa-tele-border);
  font-size: 13px !important;
  font-weight: 500;
}

.badge-telehealth svg {
  width: 12px;
  height: 12px;
}

.badge-inperson,
.badge-inperson-only {
  background-color: #f8fafc;
  color: var(--aaa-navy);
  border: 1px solid var(--aaa-border);
  font-size: 13px !important;
  font-weight: 500;
  padding: 4px 9px;
}

.badge-inperson svg,
.badge-inperson-only svg {
  width: 12px;
  height: 12px;
  color: var(--aaa-text-muted);
}

/* Card Action Buttons Row - Sleek, Compact & Aligned to Right */
.card-actions-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* Desktop Hover Reveal: Collapse completely when unhovered to eliminate empty space */
@media (min-width: 901px) {
  .card-badges-row {
    margin-bottom: 0;
    transition: margin-bottom 0.25s ease;
  }

  .aaa-service-card:hover .card-badges-row,
  .aaa-service-card:focus-within .card-badges-row {
    margin-bottom: 14px;
  }

  .card-actions-row {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    padding-top: 0;
    margin-top: 0;
    border-top-width: 0;
    border-top-color: transparent;
    transform: translateY(6px);
    transition: max-height 0.28s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.2s ease,
      padding-top 0.28s ease,
      margin-top 0.28s ease,
      transform 0.28s ease,
      visibility 0.28s ease,
      border-top-color 0.28s ease;
  }

  .aaa-service-card:hover .card-actions-row,
  .aaa-service-card:focus-within .card-actions-row {
    max-height: 80px;
    opacity: 1;
    visibility: visible;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 1px solid #f1f5f9;
    transform: translateY(0);
  }
}

.card-btn-cta,
.card-btn-cta:hover,
.card-btn-cta:focus,
.card-btn-cta:active,
.card-btn-cta *,
.card-btn-call,
.card-btn-call:hover,
.card-btn-call:focus,
.card-btn-call:active,
.card-btn-call * {
  text-decoration: none !important;
}

.card-btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--aaa-berry);
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 600;
  text-decoration: none !important;
  padding: 5px 14px;
  border-radius: 6px;
  box-shadow: none !important;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  line-height: 1.35;
  min-width: 112px;
  width: auto;
  box-sizing: border-box;
}

.card-btn-cta:hover,
.card-btn-cta:focus {
  background-color: var(--aaa-navy) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none;
}

.card-btn-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background-color: #ffffff;
  color: var(--aaa-navy) !important;
  border: 1px solid #cbd5e1;
  font-size: 14px !important;
  font-weight: 600;
  text-decoration: none !important;
  padding: 4.5px 10px;
  border-radius: 6px;
  box-shadow: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.35;
}

.card-btn-call svg {
  width: 13px;
  height: 13px;
  color: var(--aaa-berry);
  flex-shrink: 0;
  transition: color 0.2s ease, stroke 0.2s ease;
}

.card-btn-call:hover,
.card-btn-call:focus {
  background-color: var(--aaa-navy) !important;
  border-color: var(--aaa-navy) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none;
}

.card-btn-call:hover svg,
.card-btn-call:focus svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

.card-btn-call:hover span,
.card-btn-call:focus span {
  color: #ffffff !important;
}

/* ==========================================================
   EMPTY / FALLBACK STATES
   ========================================================== */
.aaa-empty-state {
  text-align: center;
  padding: 48px 24px;
  background: #ffffff;
  border: 1px solid var(--aaa-border);
  border-radius: var(--aaa-radius-lg);
  box-shadow: var(--aaa-shadow-md);
  margin-bottom: 24px;
}

.empty-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--aaa-orange-light);
  border: 1.5px solid #fed7aa;
  color: var(--aaa-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px auto;
  box-shadow: 0 4px 12px rgba(224, 126, 39, 0.12);
  flex-shrink: 0;
}

.empty-icon-wrap svg {
  width: 32px;
  height: 32px;
  stroke: var(--aaa-orange);
  display: block;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--aaa-navy);
  max-width: 980px;
  margin: 0 auto 16px auto;
  line-height: 1.45;
  text-align: center;
}

.empty-title-main {
  display: block;
}

.empty-title-loc {
  white-space: nowrap;
}

.empty-title-sub {
  display: block;
  margin-top: 4px;
}

@media (min-width: 920px) {
  .empty-title-main {
    white-space: nowrap;
  }
}

.empty-desc {
  font-size: 0.98rem;
  color: var(--aaa-text-muted);
  max-width: 620px;
  margin: 0 auto 24px auto;
  line-height: 1.6;
}

/* Empty State Modern Content (Online Support & Sister Brands) */
.aaa-empty-content {
  max-width: 780px;
  margin: 24px auto 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.aaa-empty-item {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  text-align: center;
}

.aaa-empty-item--online {
  border: none;
  border-left: none;
}

.aaa-empty-item--sister {
  border: 1px solid var(--aaa-border);
  border-radius: var(--aaa-radius-md);
  padding: 24px 20px;
  background-color: #f8fafc;
  box-sizing: border-box;
}

.aaa-empty-item .empty-item-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #334155;
  text-align: center;
}

.aaa-empty-item .empty-item-text strong {
  color: var(--aaa-navy);
  font-weight: 700;
  margin-right: 4px;
}

/* Make a Referral button */
.empty-online-cta-wrap {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.empty-btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--aaa-berry);
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 600;
  text-decoration: none !important;
  padding: 9px 24px;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(215, 7, 97, 0.22);
  cursor: pointer;
  line-height: 1.35;
}

.empty-btn-cta:hover,
.empty-btn-cta:focus {
  background-color: var(--aaa-navy) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 28, 66, 0.2);
}

.aaa-empty-item .empty-link-cta {
  color: var(--aaa-berry) !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.aaa-empty-item .empty-link-cta:hover,
.aaa-empty-item .empty-link-cta:focus {
  color: #9c0646 !important;
  opacity: 0.9;
}

/* Sister Brands Logo Grid */
ol.sister-brands,
.sister-brands {
  padding: 0 !important;
  list-style: none !important;
  margin: 20px 0 0 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 24px 36px !important;
}

ol.sister-brands li,
.sister-brands li {
  list-style: none !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease, opacity 0.2s ease !important;
  box-shadow: none !important;
}

ol.sister-brands li.is-hidden,
.sister-brands li.is-hidden,
ol.sister-brands li[style*="display: none"],
.sister-brands li[style*="display: none"] {
  display: none !important;
}

ol.sister-brands li:hover,
.sister-brands li:hover {
  transform: translateY(-2px) !important;
  opacity: 0.85 !important;
  box-shadow: none !important;
  border: none !important;
}

ol.sister-brands li a,
.sister-brands li a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

ol.sister-brands li img,
.sister-brands li img {
  max-width: 210px !important;
  max-height: 70px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}

.empty-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.aaa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--aaa-radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aaa-btn svg {
  width: 16px;
  height: 16px;
}

.aaa-btn-primary {
  background-color: var(--aaa-berry);
  color: #ffffff !important;
  border: 2px solid var(--aaa-berry);
  text-decoration: none !important;
}

.aaa-btn-primary:hover {
  background-color: var(--aaa-berry-hover);
  border-color: var(--aaa-berry-hover);
  box-shadow: 0 4px 12px rgba(215, 7, 97, 0.3);
  text-decoration: none !important;
}

.aaa-btn-secondary {
  background-color: #ffffff;
  color: var(--aaa-navy) !important;
  border: 2px solid var(--aaa-navy);
  text-decoration: none !important;
}

.aaa-btn-secondary:hover {
  background-color: var(--aaa-navy);
  color: #ffffff !important;
  text-decoration: none !important;
}

.aaa-no-subservices {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background-color: #f8fafc;
  border-radius: var(--aaa-radius-md);
}

.aaa-no-subservices p {
  color: var(--aaa-text-muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

/* ==========================================================
   CONCIERGE RESULTS CTA
   ========================================================== */
.aaa-results-concierge-cta {
  margin: 56px 0 24px 0;
  padding: 0;
  box-sizing: border-box;
}

.concierge-cta-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.concierge-cta-icon-wrap {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  background-color: var(--aaa-berry-light);
  color: var(--aaa-berry);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.concierge-cta-icon {
  width: 24px;
  height: 24px;
  color: var(--aaa-berry);
  stroke-width: 2.4;
  display: block;
}

.concierge-cta-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--aaa-text-main);
}

.concierge-cta-heading {
  color: var(--aaa-navy);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.35;
  display: inline-block;
  margin-bottom: 3px;
}

.concierge-cta-link {
  color: var(--aaa-berry) !important;
  font-weight: 600;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
  cursor: pointer;
}

.concierge-cta-link:hover,
.concierge-cta-link:focus {
  color: var(--aaa-berry-hover) !important;
}

@media (max-width: 640px) {
  .aaa-results-concierge-cta {
    padding: 14px 16px;
    margin: 36px 0 16px 0;
  }

  .concierge-cta-inner {
    align-items: flex-start;
    gap: 12px;
  }

  .concierge-cta-icon-wrap {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    margin-top: 2px;
  }

  .concierge-cta-icon {
    width: 20px;
    height: 20px;
  }

  .concierge-cta-heading {
    font-size: 1.02rem;
  }

  .concierge-cta-text {
    font-size: 0.88rem;
  }
}

/* ==========================================================
   FOOTER META
   ========================================================== */
.aaa-avail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--aaa-text-muted);
  padding: 16px 4px 0 4px;
  border-top: 1px solid var(--aaa-border);
}

.last-updated {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.last-updated svg {
  width: 16px;
  height: 16px;
  color: #334155;
  stroke-width: 2.6;
  flex-shrink: 0;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-link {
  color: var(--aaa-berry);
  font-weight: 600;
  text-decoration: none;
}

.phone-link:hover {
  text-decoration: underline;
}

.admin-refresh-link {
  color: var(--aaa-text-light);
  text-decoration: none;
}

.admin-refresh-link:hover {
  color: var(--aaa-berry);
  text-decoration: underline;
}

/* ==========================================================
   KEYFRAME ANIMATIONS
   ========================================================== */
@keyframes aaaPulseDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

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

/* ==========================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================== */
@media (max-width: 900px) {
  .aaa-panel-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px;
    width: 100% !important;
    max-width: 100% !important;
  }

  .aaa-panel-col {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .aaa-avail-hero-title {
    font-size: 1.6rem;
  }

  /* Always visible on mobile/tablets */
  .card-actions-row {
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    padding-top: 14px !important;
    margin-top: 8px !important;
    border-top: 1px solid #f1f5f9 !important;
    transform: none !important;
  }
}

@media (max-width: 640px) {

  /* Prevent horizontal overflow on entire widget */
  .aaa-avail-container {
    padding: 0 12px;
  }

  .aaa-search-panel {
    padding: 16px 14px;
    margin-bottom: 28px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box !important;
    overflow: hidden;
  }

  /* 1. Perfectly round step numbers, remove divider lines, and flush-left text hugging circles */
  .aaa-journey-tracker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .aaa-journey-step {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    line-height: 1.2;
    text-align: left;
    letter-spacing: -0.01em;
  }

  .aaa-journey-step .step-text {
    text-align: left;
    display: inline-block;
  }

  .aaa-journey-step .step-num {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    font-size: 0.68rem;
  }

  .step-divider {
    display: none !important;
  }

  /* 2. Smaller text across search & filter elements */
  .label-title {
    font-size: 0.84rem;
  }

  .label-step-badge {
    width: 19px;
    height: 19px;
    min-width: 19px;
    min-height: 19px;
    aspect-ratio: 1 / 1;
    font-size: 0.68rem;
    flex-shrink: 0;
  }

  /* 3. Keep filters strictly contained inside the box */
  .aaa-input-postcode-wrap,
  .aaa-select-service-wrap {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .input-inner {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 6px 0 10px !important;
    overflow: hidden !important;
  }

  .input-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    flex-shrink: 0;
  }

  .aaa-postcode-field {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
    font-size: 0.84rem !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
  }

  #aaa-input-postcode::placeholder,
  .aaa-postcode-field::placeholder {
    font-size: 0.78rem !important;
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
  }

  #aaa-input-postcode::-webkit-input-placeholder,
  .aaa-postcode-field::-webkit-input-placeholder {
    font-size: 0.78rem !important;
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
  }

  #aaa-input-postcode::-moz-placeholder,
  .aaa-postcode-field::-moz-placeholder {
    font-size: 0.78rem !important;
    color: #94a3b8 !important;
    opacity: 1 !important;
  }

  .btn-detect-location {
    font-size: 0.68rem !important;
    padding: 5px 8px !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .btn-detect-location svg {
    width: 14px !important;
    height: 14px !important;
  }

  .aaa-service-select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 0.82rem !important;
    padding: 0 32px 0 10px !important;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    font-weight: 400 !important;
  }

  .select-chevron {
    right: 10px;
    width: 16px;
    height: 16px;
  }

  .aaa-active-location-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 10px !important;
    gap: 8px !important;
  }

  .location-details {
    gap: 8px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .location-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    flex-shrink: 0 !important;
  }

  .location-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  .location-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .location-postcode {
    font-size: 0.84rem !important;
    line-height: 1.25 !important;
    margin-bottom: 2px !important;
    word-break: break-word !important;
  }

  .location-region {
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
    word-break: break-word !important;
  }

  .aaa-btn-change-location {
    font-size: 0.72rem !important;
    padding: 5px 8px !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .aaa-btn-change-location svg {
    width: 12px !important;
    height: 12px !important;
  }

  /* Hide quick search chips on mobile */
  .aaa-quick-chips-wrap,
  #aaa-quick-chips-wrap {
    display: none !important;
  }

  .results-heading {
    font-size: 1.15rem;
  }

  .results-subheading {
    font-size: 0.80rem;
  }

  .aaa-category-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .aaa-category-actions {
    width: 100%;
    margin-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .aaa-subservices-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .aaa-legend-bar {
    padding: 12px 14px !important;
    margin-top: 36px !important;
  }

  .aaa-legend-bar.is-collapsed {
    padding: 10px 14px !important;
  }

  .legend-items {
    flex-direction: column;
    gap: 8px;
  }

  .aaa-avail-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Equal width empty state action buttons on mobile */
  .aaa-empty-state {
    padding: 28px 16px !important;
  }

  .empty-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 12px !important;
  }

  .empty-actions .aaa-btn {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    text-align: center !important;
    padding: 12px 14px !important;
    font-size: 0.86rem !important;
  }

  .aaa-empty-item--sister {
    padding: 18px 14px !important;
  }
}

@media (max-width: 768px) {
  /* Hide quick search chips on mobile */
  .aaa-quick-chips-wrap,
  #aaa-quick-chips-wrap {
    display: none !important;
  }

  .empty-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 380px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    gap: 12px !important;
  }

  .empty-actions .aaa-btn {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  .aaa-services-grid {
    gap: 20px;
  }

  .aaa-category-card {
    padding: 16px 14px;
  }

  .aaa-category-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .aaa-category-actions .card-btn-cta,
  .aaa-category-actions .card-btn-call,
  .aaa-category-actions .card-btn-learn-more {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
  }
}