/* ==========================================================================
   BDE Élections — Soft Blue Redesign
   Design concept: Modern, clean, soft-UI with rounded edges.
   ========================================================================== */

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

:root {
  /* -- color -------------------------------------------------------------- */
  --bg-page: #F4F7FB;         /* Soft blue-tinted gray background */
  --bg-surface: #FFFFFF;      /* Cards, inputs, panels */
  
  --text-main: #22262e;       /* Requested secondary: Dark slate for primary text */
  --text-muted: #64748b;      /* Softer gray for secondary text */
  
  --accent-blue: #337cf2;     /* Requested primary: Soft blue accent */
  --accent-blue-hover: #2863c2; 
  --accent-dark: #22262e;     /* Header/Footer background */
  
  --border-color: #E2E8F0;    /* Soft borders */
  
  --signal-teal: #10B981;     /* Success states */
  --alert-coral: #EF4444;     /* Error states */
  --warning-amber: #F59E0B;   /* Warning states */

  /* -- type ----------------------------------------------------------------*/
  --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* -- spacing scale ---------------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  /* -- shapes & shadows ------------------------------------------------- */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(34, 38, 46, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(34, 38, 46, 0.08), 0 2px 4px -2px rgba(34, 38, 46, 0.04);
  --shadow-hover: 0 10px 15px -3px rgba(34, 38, 46, 0.1), 0 4px 6px -4px rgba(34, 38, 46, 0.05);
  --transition: all 0.2s ease-in-out;
}

/* -- reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 var(--space-4);
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-4); }
a { color: var(--accent-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-blue-hover); text-decoration: underline; }

/* -- layout --------------------------------------------------------------*/
.container {
  max-width: 1300px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.site-main {
  min-height: calc(100vh - 220px);
  padding-block: var(--space-8);
}

/* -- header (marquee / nameplate) ----------------------------------------*/
.site-header {
  background: var(--accent-dark);
  color: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-block: var(--space-4);
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--bg-surface);
}
.site-header__brand:hover { text-decoration: none; opacity: 0.9; }
.site-header__brand-mark { color: var(--accent-blue); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.site-nav__link {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.9rem;
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}
.site-nav__link:hover { color: var(--bg-surface); text-decoration: none; }
.site-nav__link--cta {
  background: rgba(51, 124, 242, 0.15);
  color: #60a5fa;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  font-weight: 600;
}
.site-nav__link--cta:hover { 
  background: var(--accent-blue); 
  color: var(--bg-surface); 
}
.site-nav__logout-form { display: inline; margin: 0; }

/* -- footer ----------------------------------------------------------------*/
.site-footer {
  background: var(--bg-page);
  color: var(--text-muted);
  margin-top: var(--space-12);
  border-top: 1px solid var(--border-color);
}
.site-footer__inner { padding-block: var(--space-6); text-align: center; }
.site-footer__line { margin: 0; font-size: 0.9rem; }
.site-footer__line--muted { font-size: 0.8rem; }
/* Puts the tagline and the language picker on one centred line, wrapping to
   two on narrow screens rather than overflowing. */
.site-footer__row {
  margin-top: var(--space-1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
}
.site-footer__lang {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.site-footer__lang-label { font-size: 0.8rem; color: var(--text-muted); }
/* The footer sits on --bg-page (light), so the select takes the same tokens as
   .form select rather than a light-on-dark treatment. */
.site-footer__lang select {
  font-family: var(--font-main);
  font-size: 0.8rem;
  padding: 0.2rem var(--space-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}
.site-footer__lang select:hover { border-color: var(--accent-blue); }
.site-footer__lang select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(51, 124, 242, 0.15); /* same focus ring as .form input:focus */
}

/* -- board panel (generic card) --------------------------------------------*/
.board-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-md);
}
.board-panel--narrow { max-width: 460px; margin-inline: auto; }
.board-panel--center { text-align: center; }
.board-panel__title { margin-bottom: var(--space-4); }

/* -- flap tag: repurposed to a modern status pill ---------------------------*/
.flap-tag {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(51, 124, 242, 0.1);
  color: var(--accent-blue);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
}
/* Removing the old split-flap pseudo-element entirely */
.flap-tag::after { content: none; }
.flap-tag--ok { background: rgba(16, 185, 129, 0.1); color: var(--signal-teal); }
.flap-tag--error { background: rgba(239, 68, 68, 0.1); color: var(--alert-coral); }
/* Staff account management tags. --minor is amber, not coral: being under
   18 is a fact staff check at the door, not an error state. --staff uses
   the dark accent so a privileged account is unmistakable in a long list. */
.flap-tag--minor { background: rgba(245, 158, 11, 0.12); color: var(--warning-amber); }
.flap-tag--staff { background: rgba(34, 38, 46, 0.08); color: var(--accent-dark); }

/* -- buttons ---------------------------------------------------------------*/
.button {
  display: inline-block;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.button:hover { 
  background: #f8fafc; 
  border-color: #cbd5e1;
  text-decoration: none; 
}
.button--primary { 
  background: var(--accent-blue); 
  border-color: var(--accent-blue); 
  color: var(--bg-surface); 
  box-shadow: 0 4px 6px -1px rgba(51, 124, 242, 0.2);
}
.button--primary:hover { 
  background: var(--accent-blue-hover); 
  border-color: var(--accent-blue-hover); 
  color: var(--bg-surface); 
  transform: translateY(-1px);
}
.button--block { display: block; width: 100%; }

/* Loading state: set by signup-progress.js on submit. Spinner uses
   currentColor so it reads correctly on both surface and primary buttons. */
.button:disabled { cursor: not-allowed; opacity: 0.9; }
.button.is-loading { cursor: progress; }
.button.is-loading::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: var(--space-2);
  vertical-align: -0.12em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: var(--radius-pill);
  animation: button-spin 0.6s linear infinite;
}
@keyframes button-spin { to { transform: rotate(360deg); } }

/* -- forms -------------------------------------------------------------- */
.form__field { margin-bottom: var(--space-4); }
.form__field label {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: var(--space-2);
}
.form input[type="text"],
.form input[type="search"],
.form input[type="email"],
.form input[type="password"],
.form input[type="tel"],
.form input[type="number"],
.form input[type="date"],
.form input[type="datetime-local"],
.form textarea,
.form select {
  width: 100%;
  padding: 0.6rem var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--text-main);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  resize: none;
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(51, 124, 242, 0.15);
}
.form__field-error { color: var(--alert-coral); font-size: 0.85rem; font-weight: 500; margin: var(--space-1) 0 0; }
.form__errors { 
  background: rgba(239, 68, 68, 0.05); 
  color: var(--alert-coral); 
  padding: var(--space-3) var(--space-4); 
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4); 
  font-size: 0.9rem;
}
.form__field-help { color: var(--text-muted); font-size: 0.8rem; margin: var(--space-1) 0 0; }
.form__field-help ul { margin: var(--space-1) 0 0; padding-left: var(--space-4); }
.form__field-optional { font-weight: 400; color: var(--text-muted); }
.form__field input[readonly] { background: var(--bg-page); color: var(--text-muted); }
/* Number inputs otherwise match text inputs (see .form input[type="number"]
   above) except for the native up/down spinner arrows, which nothing here
   resets - do it once, globally. */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }
/* Same treatment for search inputs: they inherit the text-input styling
   above, but WebKit still paints its own cancel button on top. */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.form__footnote { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: var(--space-4); }

/* -- django messages framework ------------------------------------------- */
.messages { list-style: none; padding: 0; margin: 0 0 var(--space-6); }
.message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  margin-bottom: var(--space-2);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}
.message--success { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); color: #065f46; }
.message--error { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); color: #991b1b; }
.message--warning { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.2); color: #92400e; }

/* -- homepage hero + quick links --------------------------------------- */
.hero {
  text-align: center;
  padding-block: var(--space-8) var(--space-12);
}
.hero__title {
  font-size: 2.5rem;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-4);
  letter-spacing: -0.03em;
}
.hero__lede {
  font-size: 1.1rem;
  max-width: 540px;
  margin-inline: auto;
  color: var(--text-muted);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}
.quick-link {
  display: block;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.quick-link:hover {
  text-decoration: none;
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.quick-link h2 { margin-bottom: var(--space-2); font-size: 1.25rem; }
.quick-link p { margin: 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

/* -- taxi booking form ---------------------------------------------------*/
.taxi-form__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
.taxi-form__map {
  /* height: 420px; /* not needed */
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden; /* clip Leaflet tiles to the rounded corners */
}
.address-field { position: relative; }
.suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 240px;
  overflow-y: auto;
}
.suggestions.open { display: block; }
.suggestion {
  padding: var(--space-2) var(--space-3);
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}
.suggestion:last-child { border-bottom: none; }
.suggestion:hover { background: var(--bg-page); }
.suggestion__cat {
  display: inline-block;
  margin-left: var(--space-2);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.route-preview {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-4);
}
.passenger-attached-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.6rem var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 720px) {
  .taxi-form__layout { grid-template-columns: 1fr; }
  .taxi-form__map { height: 280px; }
}

/* -- ride status (htmx-polled, shown above the booking form) --------------*/
.ride-status__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-color);
}
.ride-status__item:first-child { padding-top: 0; }
.ride-status__item:last-child { border-bottom: none; padding-bottom: 0; }
.ride-status__item--selected {
  background: var(--bg-page);
  border-left: 3px solid var(--accent-blue);
  padding-left: var(--space-3);
}
.ride-status__route {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
}
.ride-status__arrow { color: var(--text-muted); }
.ride-status__meta {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: var(--space-1) 0 0;
}
.ride-status__driver {
  font-size: 0.85rem;
  color: var(--text-main);
  margin: var(--space-1) 0 0;
}

/* -- booking page layout -- */
.booking-page-layout {
  display: grid;
  grid-template-columns: minmax(420px, 480px) 1fr; 
  gap: var(--space-6);
  align-items: start;
}

/* -- ride status adjustments -- */
.ride-status__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Changed from center so the timestamp stays near the top if the pill wraps */
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  width: 100%;
}

.ride-status__time {
  font-size: 0.9rem;
  text-align: right;
  white-space: nowrap; /* Prevent the time/minutes from wrapping awkwardly */
}

/* -- Dynamic Status Colors -- */
/* PENDR (Pending Resolution), CANC (Cancelled) -> Alert */
.flap-tag--pendr, .flap-tag--canc { 
  background: rgba(239, 68, 68, 0.1); 
  color: var(--alert-coral); 
}

/* WAITD (Waiting for Driver), WAITC (Waiting for Car), WAITB (Waiting for Both) -> Warning */
.flap-tag--waitd, .flap-tag--waitc, .flap-tag--waitb { 
  background: rgba(245, 158, 11, 0.1); 
  color: var(--warning-amber); 
}

/* INPRO (In Progress) -> Info */
.flap-tag--inpro { 
  background: rgba(51, 124, 242, 0.1); 
  color: var(--accent-blue); 
}

/* PLAND (Planned), COMP (Completed) -> Success */
.flap-tag--pland, .flap-tag--comp { 
  background: rgba(16, 185, 129, 0.1); 
  color: var(--signal-teal); 
}

.rides-dropdown {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.rides-dropdown__summary {
  padding: var(--space-4);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none; /* Hide default triangle in most browsers */
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.rides-dropdown__summary::-webkit-details-marker {
  display: none; /* Hide triangle in WebKit */
}

.rides-dropdown[open] .rides-dropdown__summary {
  border-bottom-color: var(--border-color);
  background: var(--bg-page);
}

.rides-dropdown__content {
  padding: var(--space-4);
}

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

/* -- Desktop Overrides -- */
@media (min-width: 801px) {
  .rides-dropdown__summary {
    cursor: default; /* Make it look like a normal header */
    pointer-events: none; /* Prevent clicking to close */
  }
  .rides-dropdown__icon {
    display: none; /* Hide the dropdown arrow indicator */
  }
}

/* -- Mobile Overrides -- */
@media (max-width: 800px) {
  .booking-page-layout {
    grid-template-columns: 1fr; /* Stack vertically */
  }
  .booking-main {
    order: 2;
  }
  .booking-sidebar {
    order: 1; /* Keep rides list on top */
  }
}

/* -- accessibility ---------------------------------------------------------*/
a:focus-visible, button:focus-visible, .site-nav__link:focus-visible, .quick-link:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* -- responsive ------------------------------------------------------------*/
@media (max-width: 640px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: var(--space-4); width: 100%; justify-content: space-between; }
  .hero__title { font-size: 2rem; }
}

label.checkbox-wrapper {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-weight: 500;
  user-select: none;
}

.custom-checkbox {
  appearance: none;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-surface);
  margin: 0;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: var(--transition);
}

/* The checkmark using a polygon clip-path */
.custom-checkbox::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--bg-surface);
  background-color: var(--bg-surface);
  transform-origin: center;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.custom-checkbox:checked {
  background-color: var(--text-main);
  border-color: var(--text-main);
}

.custom-checkbox:checked::before {
  transform: scale(1);
}

/* --- Modern File Input --- */
.custom-file-input {
  width: 100%;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
}

.custom-file-input::file-selector-button {
  padding: 0.6rem 1.2rem;
  margin-right: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-main);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.custom-file-input::file-selector-button:hover {
  background-color: var(--border-color);
  border-color: #cbd5e1; /* matches .button:hover's border shade */
}

/* --- Photo Preview Polish --- */
.photo-preview-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.photo-preview-img {
  max-width: 150px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.file-input-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
}

/* --- Profile Dropdown Flyout --- */
.profile-dropdown {
  position: relative;
  display: inline-block;
  margin-left: var(--space-2);
}

.profile-dropdown__trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: box-shadow 0.2s ease;
}

.profile-dropdown__trigger:focus-visible,
.profile-dropdown__trigger:hover {
  outline: none;
  box-shadow: 0 0 0 3px rgba(51, 124, 242, 0.15); /* same focus-ring recipe as .form input:focus */
}

.profile-dropdown__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-dropdown__avatar--placeholder {
  background-color: var(--bg-page);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-dropdown__avatar--placeholder svg {
  width: 22px;
  height: 22px;
}

.profile-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  min-width: 220px;
  padding: var(--space-4);
  z-index: 10000; /* completely reasonable z-index i guess*/

  /* Animation setup */
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.profile-dropdown__menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-color);
}

.profile-dropdown__name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
}

/* Links inside the menu */
.profile-dropdown__link {
  width: 100%;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-radius: 4px;
  transition: background-color 0.2s ease;
  display: block;
  box-sizing: border-box;
  font-weight: 500;
}

.profile-dropdown__link:hover {
  background-color: var(--bg-page);
  text-decoration: none;
}

.profile-dropdown__logout-form {
  margin: 0;
  width: 100%;
}

.profile-dropdown__link--button {
  margin-top: var(--space-1);
  justify-content: center;
}

/* --- Disabled Input Styling --- */
.form input[type="text"].custom-input--disabled,
.form input:disabled {
  background: var(--bg-page); /* Using 'background' instead of 'background-color' to override the shorthand */
  color: var(--text-muted);
  border-color: var(--border-color);
  cursor: not-allowed;
  opacity: 1; /* Prevents iOS Safari from applying its own aggressive dimming */
}