/* ==========================================================================
   Vederlagsfri Medicin - Region Hovedstaden Digital Design
   Based on "Digital designmanual - Tredjepartsløsninger v1.3 (2025)"
   ========================================================================== */

/* ==========================================================================
   Typography - Mari Font (Region Hovedstaden)
   Official typeface from Region Hovedstaden
   Weights: Light (200), Book (300), Regular (400), Bold (700)
   ========================================================================== */

@font-face {
  font-family: 'Mari';
  src: url('../fonts/Mari-Light.woff2') format('woff2'),
       url('../fonts/Mari-Light.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mari';
  src: url('../fonts/Mari-Book.woff2') format('woff2'),
       url('../fonts/Mari-Book.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mari';
  src: url('../fonts/Mari-Regular.woff2') format('woff2'),
       url('../fonts/Mari-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mari';
  src: url('../fonts/Mari-Bold.woff2') format('woff2'),
       url('../fonts/Mari-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* CSS Custom Properties - Region Hovedstaden palette */
:root {
  /* Primary - Region Hovedstaden identity color */
  --color-primary: #002555;
  --color-primary-light: #29557d;
  --color-primary-dark: #001a3d;
  --color-primary-subtle: #e5e9ee;

  /* Accent - Hospital blue (also used for koncern links) */
  --color-accent: #007dbb;
  --color-accent-hover: #005f8f;

  /* Neutrals - from design guide */
  --color-bg: #ffffff;
  --color-bg-muted: #f5f6f8;
  --color-bg-card: #ffffff;
  --color-text: #333333;
  --color-text-muted: #636C6F;
  --color-text-light: #97a0a5;
  --color-border: #ccd3dd;
  --color-border-focus: var(--color-primary);

  /* Feedback colors */
  --color-success: #002555;
  --color-success-bg: #e5e9ee;
  --color-error: #c45b5b;
  --color-error-bg: #fdf0f0;

  /* Footer - design guide specifies #646c6f */
  --color-footer-bg: #646c6f;
  --color-footer-text: #ffffff;

  /* Typography - Mari Font Family */
  --font-family: 'Mari', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Border radius - no radius on cards per regionh.dk, minimal elsewhere */
  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 0px;
  --radius-full: 9999px;

  /* Shadows - from regionh.dk: 0 0 10px rgba(0,0,0,0.15) */
  --shadow-card: 0 0 10px rgba(0, 0, 0, 0.15);
  --shadow-card-hover: 0 0 15px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 0 10px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 0 15px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 0 20px rgba(0, 0, 0, 0.25);
  --shadow-focus: 0 0 0 3px rgba(0, 37, 85, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-weight: 400; /* Mari Regular for body text */
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
  min-height: 100vh;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* ==========================================================================
   Page Layout
   ========================================================================== */

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

/* ==========================================================================
   Site Header - White bg, left-aligned logo (55-60px)
   Design guide: "Venstrestillet logo i en harmonisk størrelse (55-60 px)
   indplaceret på en hvid baggrund/header"
   ========================================================================== */

.site-header {
  background: var(--color-bg);
  padding: var(--space-md) max(var(--space-lg), 50vw - 700px);
}

.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.site-logo-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo-link:hover {
  text-decoration: none;
  opacity: 0.85;
}

.site-logo {
  height: 38px;
  width: auto;
  display: block;
}

@media (min-width: 768px) {
  .site-logo {
    height: 54px;
  }
}

/* Design guide: "Evt. navn på website/system som tagline –
   vandret centreret og sat med Mari Light" */
.site-tagline {
  font-family: var(--font-family);
  font-weight: 300; /* Mari Book */
  font-size: 14px;
  line-height: 18px;
  color: #636C6F;
}

@media (max-width: 480px) {
  .site-header {
    padding: 0 14px;
  }

  .site-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-logo-link {
    height: 58px;
    padding: 0;
  }

  /* Top bar mimicking regionh.dk "FOR SUNDHED I HOVEDSTADEN" strip */
  .site-tagline {
    order: -1;
    background: #f0f0f0;
    color: #636C6F;
    text-transform: uppercase;
    font-size: 12px;
    line-height: 14px;
    padding: 5px 12px;
    margin: 0 -12px;
  }
}

/* ==========================================================================
   Identity Band - Light tinted bar (breadcrumb area on regionh.dk)
   ========================================================================== */

.identity-band {
  background: rgba(0, 37, 85, 0.1);
  padding: 0 var(--space-lg);
}

.identity-band-inner {
  max-width: 1400px;
  margin: 0 auto;
  font-family: var(--font-family);
  font-weight: 400; /* Mari Regular */
  font-size: 16px;
  line-height: 16px;
  padding: 16px 0 15px 0;
  color: var(--color-text);
}

.identity-band-inner a {
  color: var(--color-text);
  text-decoration: underline;
}

.identity-band-inner a:hover {
  color: var(--color-primary);
}

.bc-separator {
  margin: 0 0.4em;
  color: var(--color-text-muted);
}

.bc-current {
  color: var(--color-text);
}

@media (max-width: 480px) {
  .identity-band {
    padding: 0;
  }

  .identity-band-inner {
    font-size: 14px;
    line-height: 14px;
    padding: 5px 0 5px 5px;
  }
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.main-content {
  flex: 1;
  padding: 0 max(var(--space-lg), 50vw - 700px) var(--space-2xl);
}

/* ==========================================================================
   Page Heading - Mari Light, large, like regionh.dk "Sundhed"
   ========================================================================== */

.page-heading {
  font-family: var(--font-family);
  font-weight: 200; /* Mari Light */
  font-size: 3.1em;
  color: var(--color-text);
  margin: 40px 0 15px 0;
  line-height: 1.1;
  border: none;
  outline: none;
}

@media (max-width: 1024px) {
  .page-heading {
    margin-top: 25px;
  }
}

@media (max-width: 480px) {
  .page-heading {
    font-size: 2.2em;
  }
}

/* Abstract / lead text - Mari Book, 1.4em, like regionh.dk manchet */
.page-abstract {
  font-family: var(--font-family);
  font-weight: 300; /* Mari Book */
  font-size: 1.4em;
  color: var(--color-text);
  line-height: 1.45;
  margin: 0 0 1.5em 0;
}

/* ==========================================================================
   Card - White with shadow (per design guide)
   Design guide: "Bokse er hvide med skygge, lys grå eller
   en procent af primær farve"
   ========================================================================== */

.booking-card {
  background: var(--color-bg-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-xl);
  position: relative;
  border-bottom: 2px solid var(--color-accent);
  transition: border-bottom-color 0.2s linear;
}

.booking-card:hover {
  border-bottom-color: var(--color-text);
}

@media (min-width: 640px) {
  .booking-card {
    padding: var(--space-2xl);
  }
}

/* Design guide: "Hovedrubrikker i Mari Light i stor punktstørrelse" */
.card-section-title {
  font-family: var(--font-family);
  font-weight: 700; /* Mari Bold */
  font-size: 22px;
  line-height: 26px;
  color: #002555;
  padding: 5px;
  margin: 15px 0 15px 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.card-section-title.centered {
  display: flex;
  justify-content: center;
  width: 100%;
}

.card-section-title .icon {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.card-description {
  font-family: var(--font-family);
  font-weight: 400; /* Mari Regular */
  font-size: 14px;
  color: #636C6F;
  padding: 0 5px 5px 5px;
  margin: 0 10px 10px 0px;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-row {
  display: grid;
  gap: var(--space-md);
}

.form-row-2 {
  grid-template-columns: 1fr 1fr;
}

.form-row-postal {
  grid-template-columns: 120px 1fr;
}

/* Design guide: Mari Bold for labels/navigation */
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700; /* Mari Bold */
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg-muted);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input::placeholder {
  color: var(--color-text-light);
}

.form-input:hover {
  border-color: var(--color-primary-light);
}

.form-input:focus {
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-focus);
  background: var(--color-bg-card);
}

.form-input.valid {
  border-color: var(--color-success);
}

.form-input.invalid {
  border-color: var(--color-error);
}

/* Override Blazor default input styles */
input.form-control,
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
  box-shadow: none;
}

input.form-control:hover,
.form-control:hover {
  border-color: var(--color-primary-light);
}

input.form-control:focus,
.form-control:focus {
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-focus);
  background: var(--color-bg-card);
}

/* Read-only verified field */
.form-control-readonly {
  background: var(--color-bg-muted) !important;
  color: var(--color-text-muted);
  cursor: default;
}

.form-control-readonly:hover {
  border-color: var(--color-border);
}

/* ==========================================================================
   Checkbox
   ========================================================================== */

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
  padding: var(--space-md);
  background: var(--color-bg-muted);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  margin-bottom: var(--space-md);
}

.checkbox-wrapper:hover {
  background: var(--color-primary-subtle);
}

.checkbox-wrapper.highlight {
  border: 1.5px solid var(--color-border);
}

.checkbox-input {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-bg-card);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: all var(--transition-fast);
}

.checkbox-input:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox-input:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-input:focus {
  box-shadow: var(--shadow-focus);
}

.form-check-input {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-bg-card);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: all var(--transition-fast);
}

.form-check-input:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.form-check-input:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-check-input:focus {
  box-shadow: var(--shadow-focus);
  outline: none;
}

.checkbox-label {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.5;
}

.checkbox-label .muted {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-bg-muted);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.form-check-label {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.5;
  cursor: pointer;
}

/* ==========================================================================
   Buttons
   Design guide: Mari Bold for navigation elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 1.5rem;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700; /* Mari Bold */
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  outline: none;
}

.btn:hover {
  text-decoration: none;
}

.btn:focus {
  box-shadow: var(--shadow-focus);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

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

.btn-primary:disabled {
  background: var(--color-text-light);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-secondary {
  background: var(--color-bg-muted);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-primary-subtle);
  border-color: var(--color-primary-light);
}

.btn-outline-secondary {
  background: transparent;
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
  padding: 0.875rem 1.5rem;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-outline-secondary:hover {
  background: var(--color-bg-muted);
  border-color: var(--color-primary-light);
  color: var(--color-text);
}

.btn-full {
  width: 100%;
}

.btn-group {
  display: flex;
  gap: var(--space-md);
}

.btn-group .btn:last-child {
  flex: 1;
}

/* ==========================================================================
   Alerts / Messages
   ========================================================================== */

.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  animation: slideIn 0.3s ease;
}

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

.alert-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.alert-danger {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

/* ==========================================================================
   Validation
   ========================================================================== */

.validation-message,
.text-danger {
  color: var(--color-error);
  font-size: 0.8125rem;
  margin-top: var(--space-xs);
  display: block;
}

.valid.modified:not([type=checkbox]) {
  border-color: var(--color-success);
}

.invalid {
  border-color: var(--color-error);
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  color: var(--color-text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin-bottom: var(--space-md);
}

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

.btn .loading-spinner-inline {
  width: 18px;
  height: 18px;
  border-width: 2px;
  margin: 0;
}

/* ==========================================================================
   Blazor Error UI
   ========================================================================== */

.blazor-error-boundary {
  background: var(--color-error-bg);
  border: 1px solid var(--color-error);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  color: var(--color-error);
}

.blazor-error-boundary::after {
  content: "Der opstod en fejl.";
}

#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-error);
  color: white;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

#blazor-error-ui .reload {
  color: white;
  margin-left: var(--space-md);
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  margin-left: var(--space-md);
}

/* ==========================================================================
   Site Footer
   Design guide: "Footer/afsender i mørk grå (#646c6f) med hvid tekst"
   ========================================================================== */

.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: var(--space-lg) max(var(--space-lg), 50vw - 700px);
  margin-top: auto;
}

.site-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 700; /* Mari Bold */
}

.footer-separator {
  opacity: 0.5;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-muted {
  color: var(--color-text-muted);
}

.small {
  font-size: 0.875rem;
}

.mb-3 {
  margin-bottom: var(--space-md);
}

.mb-4 {
  margin-bottom: var(--space-lg);
}

.mt-3 {
  margin-top: var(--space-md);
}

.w-100 {
  width: 100%;
}

.d-flex {
  display: flex;
}

.gap-2 {
  gap: var(--space-sm);
}

.gap-3 {
  gap: var(--space-md);
}

.flex-grow-1 {
  flex-grow: 1;
}

/* ==========================================================================
   Modal / Confirmation Dialog
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 37, 85, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-md);
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}

.modal-overlay > .modal-content {
  margin: auto;
  flex-shrink: 0;
}

.modal-overlay-top {
  align-items: flex-start;
  overflow-y: auto;
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--color-bg-card);
  box-shadow: var(--shadow-lg);
  border-bottom: 2px solid var(--color-accent);
  padding: var(--space-xl);
  max-width: 400px;
  width: 100%;
  text-align: center;
  animation: modalSlideIn 0.3s ease;
}

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

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-error-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.modal-icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-error);
}

.modal-title {
  font-family: var(--font-family);
  font-size: 1.25rem;
  font-weight: 700; /* Mari Bold for sub-headings */
  color: var(--color-text);
  margin: 0 0 var(--space-sm) 0;
}

.modal-message {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-lg) 0;
  line-height: 1.5;
}

.modal-booking-info {
  background: var(--color-bg-muted);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  text-align: left;
}

.modal-actions {
  display: flex;
  gap: var(--space-md);
}

.modal-actions .btn {
  flex: 1;
}

.policy-link {
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
}

.modal-policy {
  max-width: 560px;
  text-align: left;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-policy-body {
  font-family: var(--font-family);
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.6;
  overflow-y: auto;
  flex: 1;
  margin-bottom: var(--space-lg);
}

.modal-policy-body h3 {
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: var(--space-lg) 0 var(--space-xs) 0;
}

.modal-policy-body h3:first-child {
  margin-top: 0;
}

.modal-policy-body p {
  margin: 0 0 var(--space-md) 0;
}

.modal-policy-body ul {
  margin: 0 0 var(--space-md) 0;
  padding-left: var(--space-lg);
}

.modal-policy-body li {
  margin-bottom: var(--space-xs);
}

.btn-danger {
  background: var(--color-error);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #a04545;
}

.btn-danger:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ==========================================================================
/* ==========================================================================
   Address Autocomplete
   ========================================================================== */

.address-autocomplete {
  position: relative;
  width: 100%;
}

.address-autocomplete-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.address-autocomplete-indicator .loading-spinner-inline {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin: 0;
}

.address-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg-card);
  border: 1.5px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  animation: slideIn 0.15s ease;
}

.address-autocomplete.open input.form-control {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom-color: transparent;
}

.address-autocomplete-item {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--color-border);
}

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

.address-autocomplete-item:hover,
.address-autocomplete-item.highlighted {
  background: var(--color-primary-subtle);
}

.address-autocomplete-text {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.4;
}

.address-autocomplete-empty {
  padding: var(--space-md);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.address-autocomplete-group .form-row-postal {
  margin-top: var(--space-md);
}

