/* ============================================================================
   THE SIGN-IN CARD — one component, two containers.
   ============================================================================

   Until 19 Aug 2026 there were two unrelated sign-in implementations live:

     1. resources/views/auth/login.blade.php, inside layouts/guest.blade.php —
        the redesigned card, on its own page, reached only by typing /login or
        by a redirect.
     2. #loginModal in newLayout/modal.blade.php — a Bootstrap modal-xl with a
        photo panel and a "Secure Booking / Verified Villas / Exclusive Offers
        / Wishlist Feature" bullet list, headed "Welcome Back".

   Every route a guest actually takes to sign in — the heart on a villa card,
   "Login / Sign Up" in the header, the footer, the booking summary, and the
   availability check — opens (2). So the redesign of (1) was invisible: the
   founder reported "the login page still looks like 2015" while looking at a
   page that had been redesigned, because he was never being shown it.

   This file is the card, and only the card. It carries no page background, no
   topbar, no footer — those belong to whichever container renders it:

     page   → layouts/guest.blade.php   (sea gradient, logo lockup, footer)
     modal  → newLayout/modal.blade.php (Bootstrap dialog, scrim, close button)

   WHY THE CARD CANNOT DEPEND ON TAILWIND
   The auth pages load Vite/Tailwind; the newLayout pages load Bootstrap and
   the legacy sheets and no Tailwind at all. A card that leaned on Tailwind
   utilities would render correctly on the page and fall apart in the modal.
   So every property the card needs is set here explicitly — width, display,
   border, radius, padding — rather than inherited from a utility class. The
   Breeze components still emit their Tailwind class names; those names are
   simply not load-bearing any more.

   Brand values from bnbstay-nuxt design-system/DESIGN_SYSTEM.md:
   navy #083344, gold #C9A227, Montserrat / Montserrat Alternates 700.
   ========================================================================= */

.auth-card {
    width: 100%;
    max-width: 430px;
    /* flex item: allow shrinking below content min-width at 390px */
    min-width: 0;
    background: #fff;
    border-radius: 14px;
    padding: 34px 32px 30px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    color: #1b2b30;
    text-align: left;
}

/* In the modal the dialog already casts the shadow and owns the corner. */
.auth-card--modal {
    max-width: none;
    box-shadow: none;
    border-radius: 0;
    padding: 34px 32px 30px;
}

@media (max-width: 480px) {
    .auth-card { padding: 26px 20px 24px; }
    .auth-card--modal { padding: 26px 20px 24px; }
}

/* ---- Head ---------------------------------------------------------------- */

.auth-head { margin-bottom: 22px; }

.auth-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #C9A227;
    margin-bottom: 8px;
}

.auth-title {
    font-family: 'Montserrat Alternates', 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 27px;
    line-height: 1.2;
    color: #083344;
    margin: 0 0 8px;
}

.auth-sub {
    font-size: 14px;
    line-height: 1.6;
    color: #4b5b63;
    margin: 0;
}

/* ---- Fields -------------------------------------------------------------- */

.auth-field { margin-bottom: 16px; }

/* :not(.auth-check) matters. Without it this rule — (0,1,1) — outranks
   `.auth-check` at (0,1,0) and forces the remember-me label to display:block,
   which silently kills its own `gap` and `align-items`. The checkbox then sits
   flush against its text and off its vertical centre. Measured on the live
   modal, 19 Aug 2026: gap 0px, before/after 8px. */
.auth-card label:not(.auth-check),
.auth-label {
    display: block;
    color: #083344;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d4dbdf;
    border-radius: 10px;
    padding: 11px 13px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    color: #1b2b30;
    background: #fff;
    box-shadow: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.auth-card input[type="text"]:focus,
.auth-card input[type="email"]:focus,
.auth-card input[type="password"]:focus,
.auth-input:focus {
    outline: none;
    border-color: #C9A227;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, .28);
    /* Tailwind's ring variable, for the page container where Tailwind is loaded
       and its own focus utility would otherwise paint the ring indigo. */
    --tw-ring-color: rgba(201, 162, 39, .35);
}

.auth-card input[type="text"]::placeholder,
.auth-card input[type="email"]::placeholder,
.auth-card input[type="password"]::placeholder,
.auth-input::placeholder { color: #98a9af; }

/* Password reveal */
.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input { padding-right: 46px; }

.auth-reveal {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6a7f86;
    cursor: pointer;
}
.auth-reveal:hover { color: #083344; }
.auth-reveal:focus-visible {
    outline: 2px solid #C9A227;
    outline-offset: 1px;
}

/* ---- Row: remember + forgot ---------------------------------------------- */

.auth-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin: 4px 0 20px;
}

.auth-card label.auth-check,
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    color: #4b5b63;
    cursor: pointer;
}

.auth-card input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #C9A227;
    cursor: pointer;
}
.auth-card input[type="checkbox"]:focus-visible {
    outline: 2px solid #C9A227;
    outline-offset: 2px;
    --tw-ring-color: rgba(201, 162, 39, .4);
}

/* ---- Primary button ------------------------------------------------------ */

/* Full width, not a right-aligned chip beside the forgot link. The submit is
   the one thing the guest came here to press. The :not(.underline) guard
   leaves text-style buttons (the verify-email "Log Out" link-button) as links. */
.auth-card button[type="submit"]:not(.underline),
.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    background: #083344;
    border: 0;
    border-radius: 999px;
    padding: 13px 26px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: none;
    color: #fff;
    cursor: pointer;
    transition: background .18s ease;
}

.auth-card button[type="submit"]:not(.underline):hover,
.auth-submit:hover { background: #0c4a5f; }

.auth-card button[type="submit"]:not(.underline):focus-visible,
.auth-submit:focus-visible {
    outline: 2px solid #C9A227;
    outline-offset: 2px;
    --tw-ring-color: rgba(201, 162, 39, .5);
}

.auth-card button[type="submit"][disabled],
.auth-submit[disabled] { opacity: .6; cursor: default; }

/* ---- The divider slot ----------------------------------------------------
   Reserved beneath the primary button for social sign-in. It renders now, with
   nothing under it, on purpose: the slot is what the approved standard asks
   for, and a provider button dropped in below needs no layout change. If we
   decide against social sign-in entirely, delete this block — do not leave an
   "or" pointing at nothing for longer than it takes to wire a provider. */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 0;
    color: #8b9ca2;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #e2e8ea;
}

.auth-social { margin-top: 16px; display: grid; gap: 10px; }

/* ---- Links, flash, alt --------------------------------------------------- */

.auth-card a,
.auth-link {
    color: #083344;
    font-weight: 500;
    font-size: 13.5px;
    text-decoration: underline;
    text-decoration-color: #C9A227;
    text-underline-offset: 3px;
}
.auth-card a:hover,
.auth-link:hover { color: #C9A227; }

.auth-card button.underline {
    color: #083344;
    background: none;
    border: 0;
    text-decoration: underline;
    text-decoration-color: #C9A227;
    text-underline-offset: 3px;
    cursor: pointer;
}
.auth-card button.underline:hover { color: #C9A227; }

.auth-flash {
    margin: 0 0 18px;
    padding: 11px 14px;
    border-radius: 10px;
    border-left: 3px solid #b3261e;
    background: #fbecec;
    color: #b3261e;
    font-size: 13.5px;
    line-height: 1.55;
}

.auth-flash--ok {
    border-left-color: #1b6e52;
    background: #e9f4ef;
    color: #1b6e52;
}

/* JustValidate paints .invalid-feedback into the modal card. */
.auth-card .invalid-feedback {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    color: #b3261e;
}
.auth-card .is-invalid { border-color: #b3261e; }

.auth-alt {
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid #eceff0;
    font-size: 13.5px;
    color: #4b5b63;
    text-align: center;
}

/* ---- Modal container -----------------------------------------------------
   Replaces .premium-auth-modal. The card sizes the dialog rather than the
   dialog stretching the card, so the modal and the page are the same object at
   the same width. modal-xl is gone with the photo panel it existed to hold. */

#loginModal .modal-dialog {
    max-width: 460px;
}

#loginModal .modal-content {
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(3, 22, 30, .34);
}

#loginModal .modal-body { padding: 0; }

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6a7f86;
    cursor: pointer;
}
.auth-modal-close:hover { background: #f1f5f6; color: #083344; }
.auth-modal-close:focus-visible { outline: 2px solid #C9A227; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .auth-card input,
    .auth-card button[type="submit"],
    .auth-submit { transition: none; }
}
