/* ================================================================
   ProfileMenuDrawer.css — Profile drawer and shared button styles
   All values use Momento design tokens from tokens.css
   ================================================================ */

/* ── Global base rules ────────────────────────────────────────────────────────
   REMOVED 2026-07-30. This component file carried a second copy of app.css's base
   layer (body font, `a`, `.btn-primary`, the validation/error-boundary rules, the
   checkbox border) and, loading after app.css, it won — including a `.btn:focus`
   halo hard-coded to bootstrap blue #258cfb instead of the design system's focus
   vocabulary. v3.0.1's ProfileMenuDrawer.css declares no global rules at all: the
   base layer belongs to app.css, focus to Accessibility.css/FocusRing.css.
   (`.content { padding-top: 1.1rem }` went with it — MainLayout's article carries
   an inline `padding: 0 !important`, so it never applied.) ── */

/* ── Button variants ──────────────────────────────────────────────────────────
   REMOVED 2026-07-30. This file used to re-declare `.mudbutton-ui` / `-grey`, and
   because it loads after app.css its copy silently became the app-wide button:
   body font instead of heading, 16px line-height instead of 24px, no hover
   brighten. v3.0.1 declares the CTA trio exactly once — it now lives only in
   app.css. Surface-specific overrides go on a compound selector (see
   `.fc-signin-sheet .mudbutton-ui` in Login.css), never on the bare class. ── */

/* ── Bottom drawer ────────────────────────────────────────── */
.custom-bottom-drawer {
  position: fixed !important;
  height: auto !important;
  overflow-y: auto !important;
  background-color: var(--color-surface-default);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  transition: height 0.3s ease, transform 0.3s ease;
  z-index: 1300;
  margin: 0 !important;
  padding: var(--space-2) var(--space-2) calc(var(--space-2) + var(--fc-bottom-inset));
  width: 100%;
  right: 0;
  min-width: 320px;
  gap: var(--space-2);
  display: flex;
  flex-direction: column;
}

@media (max-width: 744px) {
  .language-selector-container {
    max-width: 100%;
    padding: 0 var(--space-2);
  }

  .custom-bottom-drawer {
    left: 0 !important;
  }

  .custom-bottom-drawer.drawer-open {
    padding: var(--space-2) var(--space-2) calc(var(--space-2) + var(--fc-bottom-inset));
  }
}

/* Resting open position. NOT !important — an !important here overrode the fc-sheet-up entrance
   keyframes (per the cascade, !important beats animations), so the drawer just popped in. Without
   it, the slide-up animation plays and the element settles back here afterwards. */
.drawer-open {
    transform: translateY(0);
}

.mud-drawer-content {
    /* 0, NOT the safe-area inset. The drawer SURFACE (.custom-bottom-drawer above) owns the
       bottom inset now, so an inset here would stack on top of it. This also used to be the one
       place the two platforms diverged: bare env(safe-area-inset-bottom) resolves on iOS but is
       always 0 in the Android WebView, which is why --fc-bottom-inset exists. */
    padding-bottom: 0;
}

.mud-drawer-form {
    max-height: 60vh;
    overflow-y: auto;
}

/* Desktop and up: fixed width, centered */
@media (min-width: 745px) {
  .language-selector-container {
    max-width: 600px;
  }

  .custom-bottom-drawer {
    left: calc(50% - 359px) !important;
  }

  .custom-bottom-drawer.drawer-open {
    position: fixed !important;
    right: auto !important;
    width: 718px !important;
    overflow: auto !important;
    padding: var(--space-2) var(--space-2) calc(var(--space-2) + var(--fc-bottom-inset));
  }
}

/* ── Drawer header ────────────────────────────────────────── */
.mud-drawer-header {
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
}

.mud-drawer-header-label {
    flex-grow: 1;
    margin-right: var(--space-1);
    font-size: 20px;
    font-weight: bold;
}

/* ── Delete account buttons ───────────────────────────────── */
/* #D32F2F is the design system's single destructive red (UI-UX-STANDARDS §12.1),
   same value as .mudbutton-danger — not the #FF0800 this used to carry. */
.delete-account-enabled {
    background-color: #D32F2F !important;
    color: var(--color-surface-default) !important;
}

.delete-account-disabled {
    background-color: var(--color-text-disabled) !important;
    color: var(--color-surface-default) !important;
}

/* ── Language selector ────────────────────────────────────── */
.language-selector-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.language-select {
    width: 100%;
}

/* ── Validation / error ───────────────────────────────────── */
.error-message {
    color: var(--mud-palette-error);
    font-size: 0.75rem;
    margin-top: 4px;
}

/* ── Delete-account warning ───────────────────────────────── */
/* Momento text-label-md 14/18 (Kelly, 2026-09-29, row #39); was 14/20 (20 is not the label token). */
.fc-delete-account-warning {
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: var(--text-label-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-label-md-lh);
}

/* ── Version text ─────────────────────────────────────────── */
.version-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2);
    color: var(--color-brand-primary);
    font-size: var(--text-body-md-size);
    font-weight: var(--fw-normal);
    margin-bottom: 0;
    font-family: var(--font-body);
    white-space: nowrap;
}

/* Matches v3.0.1 .fc-profile-version's 16px icon. The id gives (1,1,0), which already
   beats MudBlazor's `.mud-icon-size-small { font-size: 1.25rem }` (0,1,0, no !important) —
   so no !important is needed. BottomDrawer.razor's body-level `.mud-icon-root` block sets
   only display/flex-direction/align-items/justify-content, never font-size, so it does not
   compete here either. */
#version-icon.mud-icon-root {
    font-size: 16px;
}

.version-label {
    font-weight: var(--fw-normal);
}
