/* Maison platform fragments (templates/maison/*.twig) — hand-written te-*
   pieces only. Generated from ../atelier/auth.src.css with the daisyUI
   variables swapped for Maison tokens (--color-*, defined by the store's
   theme.min.css). No Tailwind build: every utility the fragments use is
   compiled into the Maison theme sheet, which @source-scans this folder. */
[hidden] { display: none !important; }


/* preflight is off (see tailwind.config.js) so nothing here defines [hidden],
   and the browser's own [hidden]{display:none} loses to any author display
   utility regardless of specificity. Without this rule a hidden row that also
   carries a display class — `<div class="grid" hidden>`, i.e. the address
   form's [data-geo-row] blocks — stays on screen. !important because [hidden]
   and .grid have identical specificity. */
[hidden] { display: none !important; }

/* ── Auth-specific pieces not covered by daisyUI components ──────────
   Deliberately OUTSIDE @layer: several of these class names only appear
   assembled at runtime in auth.js (te-toast--success, is-open, ...), and
   layered rules whose names the content scanner can't find get purged.
   Plain rules pass through the build untouched. ─────────────────────── */

  /* In-flight button spinner (shown/hidden by auth.js) */
  .te-spin {
    display: none;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 9999px;
    animation: te-spin 0.6s linear infinite;
    vertical-align: middle;
  }
  .te-spin.is-on { display: inline-block; }
  @keyframes te-spin { to { transform: rotate(360deg); } }

  /* Modal (vanilla; auth.js toggles .is-open) */
  .te-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    overflow-y: auto;
    background-color: rgb(0 0 0 / 0.5);
    padding: 1rem;
  }
  .te-modal.is-open { display: block; }
  .te-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 26rem;
    margin: 4rem auto;
    animation: te-modal-in 0.25s ease-out;
  }
  @keyframes te-modal-in {
    from { opacity: 0; transform: translateY(-1.5rem); }
    to   { opacity: 1; transform: none; }
  }
  body.te-modal-open { overflow: hidden; }

  /* Toast (appended to <body> by auth.js) */
  .te-toast {
    position: fixed;
    top: 1rem;
    left: 50%;
    z-index: 1100;
    transform: translate(-50%, -150%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: min(92vw, 28rem);
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    text-align: center;
    box-shadow: 0 10px 25px rgb(0 0 0 / 0.15);
  }
  .te-toast--success { background-color: var(--color-success); color: #fff; }
  .te-toast--error { background-color: var(--color-sale); color: #fff; }
  .te-toast.is-shown { transform: translate(-50%, 0); opacity: 1; }

  /* Field-level error text (auth.js fills + shows) */
  .te-field-error {
    display: none;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--color-sale);
  }
  .te-field-error.is-shown { display: block; }
  .form-group.has-error .m-input,
  .form-group.has-error .m-select {
    border-color: var(--color-sale);
  }

  /* 6-digit OTP boxes */
  .te-otp {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
  }
  .te-otp input {
    width: 2.75rem;
    height: 3.25rem;
    text-align: center;
    font-size: 1.25rem;
  }

  .te-recaptcha { margin: 0.25rem 0 0.5rem; }

  /* Autocomplete suggestions (account.js attachSuggest — city/barangay) */
  .te-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 40;
    margin-top: 0.25rem;
    max-height: 14rem;
    overflow-y: auto;
    border-radius: 0.75rem;
    border: 1px solid rgb(0 0 0 / 0.1);
    background-color: var(--color-card);
    box-shadow: 0 10px 25px rgb(0 0 0 / 0.12);
  }
  .te-suggest button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    background: transparent;
    border: 0;
    cursor: pointer;
  }
  .te-suggest button:hover {
    background-color: var(--color-surface);
  }

  /* Google Places predictions (account.js — landmark field). Google appends
     .pac-container to <body> and positions/sizes it inline, so only cosmetics
     belong here — unlike .te-suggest it needs no positioned ancestor. The
     `body >` qualifier is load-bearing: Maps injects its own stylesheet into
     <head> at runtime, i.e. AFTER auth.css, so an equal-specificity rule
     would lose every tie. z-index clears the sticky store header (z-50) while
     staying under .te-modal (1050). Do not hide .pac-container:after — the
     "Powered by Google" mark is required attribution when no map is shown. */
  body > .pac-container {
    z-index: 1000;
    margin-top: 0.25rem;
    border: 1px solid rgb(0 0 0 / 0.1);
    border-radius: 0.75rem;
    background-color: var(--color-card);
    box-shadow: 0 10px 25px rgb(0 0 0 / 0.12);
    font-family: inherit;
  }
  body > .pac-container .pac-item {
    padding: 0.5rem 0.875rem;
    border-top: 0;
    font-size: 0.875rem;
    color: color-mix(in srgb, var(--color-fg) 70%, transparent);
    cursor: pointer;
  }
  body > .pac-container .pac-item:hover,
  body > .pac-container .pac-item-selected {
    background-color: var(--color-surface);
  }
  body > .pac-container .pac-item-query {
    font-size: 0.875rem;
    color: var(--color-fg);
  }

  /* Password show/hide toggle (button inside .te-pw wrapper) */
  .te-eye {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: color-mix(in srgb, var(--color-fg) 45%, transparent);
    border-radius: 9999px;
  }
  .te-eye:hover { color: color-mix(in srgb, var(--color-fg) 80%, transparent); }
