/**
 * Advocate apply — Material Design 3
 * https://m3.material.io/styles  (color · typography · shape · elevation)
 * Brand: navy primary, yellow tertiary
 */

:root {
  /* Color roles */
  --md-sys-color-primary: #182743;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #d4dae6;
  --md-sys-color-on-primary-container: #0d1524;

  --md-sys-color-secondary: #505968;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #dce1ec;
  --md-sys-color-on-secondary-container: #0d1524;

  --md-sys-color-tertiary: #ffef4b;
  --md-sys-color-on-tertiary: #182743;
  --md-sys-color-tertiary-container: #fff6a0;
  --md-sys-color-on-tertiary-container: #182743;

  --md-sys-color-error: #b3261e;
  --md-sys-color-on-error: #ffffff;

  --md-sys-color-surface: #eceef2;
  --md-sys-color-on-surface: #182743;
  --md-sys-color-surface-variant: #e1e4ea;
  --md-sys-color-on-surface-variant: #434a57;

  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f4f5f8;
  --md-sys-color-surface-container: #eef0f4;
  --md-sys-color-surface-container-high: #e8ebf0;
  --md-sys-color-surface-container-highest: #e2e5eb;

  --md-sys-color-outline: #737a87;
  --md-sys-color-outline-variant: #c4c9d2;

  /* Shape */
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 9999px;

  /* Motion */
  --md-sys-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-duration-short: 200ms;

  /* Spacing — 4dp grid (https://m3.material.io/styles/spacing/overview) */
  --md-sys-spacing-1: 4px;
  --md-sys-spacing-2: 8px;
  --md-sys-spacing-3: 12px;
  --md-sys-spacing-4: 16px;
  --md-sys-spacing-5: 20px;
  --md-sys-spacing-6: 24px;
  --md-sys-spacing-8: 32px;
  --md-sys-spacing-10: 40px;
  --md-sys-spacing-12: 48px;

  --md-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--md-font);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--md-sys-color-primary);
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

/* Type scale */
.aa-headline {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.aa-title {
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.3;
}

.aa-title-sm {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.aa-label-lg {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--md-sys-color-on-surface-variant);
}

.aa-label-md {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--md-sys-color-on-surface-variant);
}

.aa-body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--md-sys-color-on-surface-variant);
}

.aa-body-sm {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--md-sys-color-on-surface-variant);
}

.aa-required {
  color: var(--md-sys-color-error);
}

/* App bar */
.aa-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 max(24px, calc((100% - 1120px) / 2));
}

.aa-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
}

.aa-brand img {
  border-radius: var(--md-sys-shape-corner-extra-small);
}

.aa-brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aa-assist-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Main: large tonal panel (MD3 adaptive / m3.material.io pattern) */
.aa-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 48px;
}

.aa-panel {
  position: relative;
  background: var(--md-sys-color-surface-container-lowest);
  border-radius: var(--md-sys-shape-corner-extra-large);
  padding: 32px 24px 40px;
  box-shadow: 0 1px 2px rgb(24 39 67 / 0.04);
}

.aa-hero {
  max-width: 36rem;
  margin-bottom: 8px;
  padding-bottom: 32px;
}

.aa-hero .aa-label-lg {
  margin-bottom: 8px;
}

.aa-hero .aa-headline {
  margin-bottom: 12px;
}

.aa-form {
  display: flex;
  flex-direction: column;
}

.aa-section {
  padding: 32px 0;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.aa-section--last {
  padding-bottom: 8px;
}

.aa-section .aa-title {
  margin-bottom: 24px;
}

.aa-section:has(.aa-plans) .aa-title {
  margin-bottom: var(--md-sys-spacing-4);
}

/* MD3 avatar (person) + list-style photo picker */
.md-avatar-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-surface-container-low);
}

.md-avatar {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--md-sys-shape-corner-full);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  cursor: pointer;
}

.md-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.md-avatar-icon {
  width: 36px;
  height: 36px;
}

.md-avatar-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.md-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.md-btn--sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.875rem;
}

.md-btn--text {
  background: transparent;
  color: var(--md-sys-color-primary);
}

.md-btn--text:hover:not(:disabled) {
  background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.md-btn--tonal.md-btn--sm {
  min-width: 0;
}

.aa-fields {
  display: grid;
  gap: 24px 20px;
}

.aa-span-2 {
  grid-column: 1 / -1;
}

.aa-serve-rate {
  grid-column: 1 / -1;
  display: grid;
  gap: 24px;
  align-items: start;
}

@media (min-width: 800px) {
  .aa-serve-rate {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: end;
  }

  .aa-serve-rate .aa-fieldset {
    padding-bottom: 20px; /* align with rate field supporting text */
  }
}

.aa-fieldset {
  border: 0;
  margin: 28px 0 0;
  min-width: 0;
}

.aa-fieldset--flush {
  margin: 0;
}

.aa-fieldset legend {
  margin-bottom: 12px;
}

@media (min-width: 800px) {
  .aa-main {
    width: min(1120px, calc(100% - 64px));
    padding: 16px 0 64px;
  }

  .aa-panel {
    padding: 48px 56px 56px;
  }

  .aa-fields {
    grid-template-columns: 1fr 1fr;
  }

  .aa-section {
    padding: 40px 0;
  }
}

/* Outlined text field — floating label */
.md-outlined {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.md-outlined input,
.md-outlined select {
  width: 100%;
  height: 56px;
  padding: 16px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-extra-small);
  background: transparent;
  color: var(--md-sys-color-on-surface);
  caret-color: var(--md-sys-color-primary);
  outline: none;
  transition: border-color var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}

.md-outlined select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23737a87' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.md-outlined input:hover,
.md-outlined select:hover {
  border-color: var(--md-sys-color-on-surface);
}

.md-outlined input:focus,
.md-outlined select:focus {
  border-width: 2px;
  border-color: var(--md-sys-color-primary);
  padding: 15px;
}

.md-outlined--select select:focus {
  padding-right: 39px;
}

.md-outlined label {
  position: absolute;
  left: 12px;
  top: 28px;
  transform: translateY(-50%);
  padding: 0 4px;
  max-width: calc(100% - 24px);
  background: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    top var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard),
    font-size var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard),
    color var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}

.md-outlined input:focus + label,
.md-outlined input:not(:placeholder-shown) + label,
.md-outlined select:focus + label,
.md-outlined select:valid + label {
  top: 0;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.md-outlined input:focus + label,
.md-outlined select:focus + label {
  color: var(--md-sys-color-primary);
}

.md-supporting {
  margin-top: 4px;
  padding-inline: 16px;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--md-sys-color-on-surface-variant);
}

.md-supporting--confirm {
  color: var(--md-sys-color-primary);
}

.aa-location-result:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aa-location-result__icon {
  flex-shrink: 0;
}

.md-outlined--prefix input {
  padding-left: 36px;
}

.md-outlined--prefix input:focus {
  padding-left: 35px;
}

.md-outlined--prefix label {
  left: 32px;
}

.md-outlined--prefix input:focus + label,
.md-outlined--prefix input:not(:placeholder-shown) + label {
  left: 12px;
}

.md-prefix,
.md-suffix {
  position: absolute;
  top: 28px;
  transform: translateY(-50%);
  color: var(--md-sys-color-on-surface-variant);
  pointer-events: none;
}

.md-prefix {
  left: 16px;
}

.md-suffix {
  right: 16px;
  font-size: 0.875rem;
}

/* Filter chips — https://m3.material.io/components/chips */
.md-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.md-chip {
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.md-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.md-chip-face {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25;
  transition:
    background var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard),
    border-color var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard),
    color var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard),
    padding var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard),
    gap var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}

.md-chip-check {
  display: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.md-chip:hover .md-chip-face {
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, var(--md-sys-color-surface-container-low));
}

.md-chip:has(input:checked) .md-chip-face {
  gap: 8px;
  padding-left: 8px;
  border-color: transparent;
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.md-chip:has(input:checked) .md-chip-check {
  display: block;
}

.md-chip:has(input:focus-visible) .md-chip-face {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

/* Plan cards — MD3 outlined selectable cards
   Spacing: 4dp grid · 16dp padding · 12dp row rhythm · 16dp list gap
   https://m3.material.io/styles/spacing/overview */
.aa-plans {
  display: flex;
  flex-direction: column;
  gap: var(--md-sys-spacing-4);
  padding-top: var(--md-sys-spacing-2);
}

.md-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--md-sys-spacing-3);
  padding: var(--md-sys-spacing-4);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container-lowest);
  cursor: pointer;
  transition:
    background var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard),
    border-color var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
  -webkit-tap-highlight-color: transparent;
}

.md-plan-card input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.md-plan-card:has(input:focus-visible) {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.md-plan-card:hover {
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 4%, var(--md-sys-color-surface-container-lowest));
}

.md-plan-card.is-selected,
.md-plan-card:has(input:checked) {
  border: 2px solid var(--md-sys-color-primary);
  background: color-mix(in srgb, var(--md-sys-color-primary) 6%, var(--md-sys-color-surface-container-lowest));
  padding: calc(var(--md-sys-spacing-4) - 1px);
}

.md-plan-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--md-sys-spacing-4);
  pointer-events: none;
}

.md-plan-card--recommended {
  margin-top: var(--md-sys-spacing-2);
  padding-top: var(--md-sys-spacing-5);
}

.md-plan-card--recommended.is-selected,
.md-plan-card--recommended:has(input:checked) {
  padding-top: calc(var(--md-sys-spacing-5) - 1px);
}

.md-plan-card__main {
  display: flex;
  align-items: flex-start;
  gap: var(--md-sys-spacing-4);
  pointer-events: none;
}

@media (min-width: 600px) {
  .md-plan-card__main {
    gap: var(--md-sys-spacing-4);
  }
}

.md-plan-card__thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--md-sys-shape-corner-small);
  overflow: hidden;
  background: var(--md-sys-color-surface-container-high);
}

@media (min-width: 600px) {
  .md-plan-card__thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--md-sys-shape-corner-medium);
  }
}

.md-plan-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.md-plan-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--md-sys-spacing-1);
  min-width: 0;
}

.md-plan-card__meta {
  display: flex;
  align-items: center;
  gap: var(--md-sys-spacing-4);
  flex-shrink: 0;
}

.md-plan-card__name {
  flex-shrink: 0;
  font-size: 1rem; /* titleMedium */
  font-weight: 500;
  letter-spacing: 0.009375em;
  line-height: 1.25;
  color: var(--md-sys-color-on-surface);
}

.md-plan-card__badge {
  position: absolute;
  top: 0;
  left: var(--md-sys-spacing-4);
  z-index: 1;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: var(--md-sys-spacing-1) var(--md-sys-spacing-2);
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-tertiary);
  color: var(--md-sys-color-on-tertiary);
  font-size: 0.6875rem; /* labelSmall */
  font-weight: 500;
  letter-spacing: 0.03125em;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--md-sys-color-surface-container-lowest);
}

.md-plan-card--recommended.is-selected .md-plan-card__badge,
.md-plan-card--recommended:has(input:checked) .md-plan-card__badge {
  left: calc(var(--md-sys-spacing-4) - 1px);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--md-sys-color-primary) 6%, var(--md-sys-color-surface-container-lowest));
}

.md-plan-card__price {
  display: inline-flex;
  align-items: baseline;
  gap: var(--md-sys-spacing-1);
  flex-shrink: 0;
  white-space: nowrap;
}

.md-plan-card__price-amt {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
  color: var(--md-sys-color-on-surface);
}

@media (min-width: 600px) {
  .md-plan-card__price-amt {
    font-size: 1.25rem;
  }
}

.md-plan-card__price-period {
  font-size: 0.875rem; /* bodyMedium */
  font-weight: 400;
  letter-spacing: 0.015625em;
  line-height: 1.25;
  color: var(--md-sys-color-on-surface-variant);
}

.md-plan-card__lead {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.009375em;
  line-height: 1.5;
  color: var(--md-sys-color-on-surface);
}

@media (min-width: 600px) {
  .md-plan-card__lead {
    font-size: 1.125rem; /* titleLarge */
    line-height: 1.33;
  }
}

.md-plan-card__benefits {
  font-size: 0.875rem; /* bodyMedium */
  font-weight: 400;
  letter-spacing: 0.015625em;
  line-height: 1.43;
  color: var(--md-sys-color-on-surface-variant);
}

.md-plan-card__radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--md-sys-color-on-surface-variant);
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface-container-lowest);
  flex-shrink: 0;
}

.md-plan-card:has(input:checked) .md-plan-card__radio {
  border-color: var(--md-sys-color-primary);
  box-shadow: inset 0 0 0 4px var(--md-sys-color-primary);
}

/* Checkboxes */
.aa-checks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 40rem;
}

.md-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  cursor: pointer;
}

.md-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.md-check-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid var(--md-sys-color-outline);
  border-radius: 2px;
}

.md-check:has(input:checked) .md-check-box {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.md-check:has(input:focus-visible) .md-check-box {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

/* Actions */
.aa-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.aa-actions-note {
  text-align: center;
}

.md-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}

.md-btn--filled {
  width: 100%;
  background: var(--md-sys-color-tertiary);
  color: var(--md-sys-color-on-tertiary);
}

.md-btn--filled:hover:not(:disabled) {
  background: #ffe820;
}

.md-btn--filled:disabled {
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
  cursor: not-allowed;
}

.md-btn--tonal {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  min-width: 200px;
}

.md-btn--tonal:hover:not(:disabled) {
  background: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 8%, var(--md-sys-color-secondary-container));
}

@media (min-width: 800px) {
  .aa-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
  }

  .aa-actions-note {
    margin-right: auto;
    text-align: left;
  }

  .md-btn--filled {
    width: auto;
    min-width: 220px;
  }
}

@media (max-width: 799px) {
  .aa-main {
    padding-bottom: 120px;
  }

  .aa-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    margin: 0;
    padding: 12px 20px max(16px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--md-sys-color-outline-variant);
    background: color-mix(in srgb, var(--md-sys-color-surface) 92%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}

/* Loading overlay */
.aa-loading {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--md-sys-color-surface) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.aa-loading[hidden] {
  display: none !important;
}

.md-circular-progress {
  width: 48px;
  height: 48px;
  animation: md-circular-rotate 1.5s linear infinite;
}

.md-circular-progress svg {
  width: 48px;
  height: 48px;
  transform: rotate(-90deg);
}

.md-circular-progress-track {
  fill: none;
  stroke: var(--md-sys-color-surface-variant);
  stroke-width: 4;
}

.md-circular-progress-active {
  fill: none;
  stroke: var(--md-sys-color-primary);
  stroke-width: 4;
  stroke-dasharray: 100 26;
  stroke-linecap: round;
  animation: md-circular-dash 1.5s ease-in-out infinite;
}

@keyframes md-circular-rotate {
  to { transform: rotate(360deg); }
}

@keyframes md-circular-dash {
  0% { stroke-dashoffset: 0; }
  50% { stroke-dasharray: 80 46; stroke-dashoffset: -30; }
  100% { stroke-dasharray: 100 26; stroke-dashoffset: -126; }
}

.aa-todo {
  margin: 24px auto 32px;
  padding-left: 1.25rem;
  text-align: left;
}

.aa-todo li + li {
  margin-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* Google Places suggestions dropdown */
.pac-container {
  z-index: 10000;
  border-radius: var(--md-sys-shape-corner-medium);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: 0 8px 24px rgba(24, 39, 67, 0.12);
  font-family: var(--md-font);
  margin-top: 4px;
}
