/*
 * Albinya authentication pages - structural glue for the vendored dashboard template's own authentication pages.
 *
 * Everything visible (background, card, inputs, buttons, password control, alerts, footer) is the template's (bootstrap.min.css + app.min.css),
 * unmodified. This file only adds what the template's static demo does not need:
 *   1. the Arabic glyph fallback (the template's face has no Arabic letters; IBM Plex Sans Arabic is the same design, served from this origin);
 *   2. the visible state of a field the SERVER rejected or the registration script flagged (aria-invalid) - the template's own invalid colour;
 *   3. the anti-spam honeypot, kept out of sight without ever widening the page (inset-inline, never a negative left offset);
 *   4. layout-only rules for the registration wizard (its review list, plan details), which has no template equivalent.
 */

/* 1. Arabic glyphs */
html[dir=rtl] { --vz-font-sans-serif: "IBM Plex Sans", "IBM Plex Sans Arabic", sans-serif; }

/* 2. server / script flagged fields use the template's invalid border */
.form-control[aria-invalid=true], .form-select[aria-invalid=true] { border-color: var(--vz-form-invalid-border-color, var(--vz-danger)); }
.form-check-input[aria-invalid=true] { border-color: var(--vz-danger); }

/* 3. honeypot */
.honeypot { position: absolute; inset-inline-start: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; pointer-events: none; }

/* 4. registration wizard */
#register-form [hidden] { display: none !important; }
#registration-review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: .5rem 1rem; overflow-wrap: anywhere; margin: 0; }
#registration-review dt { color: var(--vz-secondary-color); font-weight: 500; }
#registration-review dd { margin: 0; }
#registration-plan-details { overflow-wrap: anywhere; }
#registration-plan-details p { margin: .25rem 0; }
.registration-error { overflow-wrap: anywhere; }

/* long values (an invitation code, an address) wrap instead of widening the card */
.auth-page-content .card-body { overflow-wrap: anywhere; }

/*
 * 5. Albinya background and small-screen behaviour.
 * The template's stock photograph is replaced by a self-hosted vehicle-inspection illustration (images/albinya-inspection-bg.svg, no external
 * request). Only the background image and the overlay strength change; the card, inputs, buttons and footer remain the template's.
 */
.auth-one-bg { background-image: url(../images/albinya-inspection-bg.svg); background-position: center; background-size: cover; background-repeat: no-repeat; }
.auth-one-bg .bg-overlay { opacity: .62; }
.auth-page-content .auth-logo { max-width: 100%; }
.auth-page-content .auth-logo img { max-width: min(220px, 70vw); height: auto; max-height: 48px; }
.auth-page-content .container { max-width: 100%; }
.auth-page-content .form-control, .auth-page-content .form-select { min-height: 2.5rem; }

@media (max-width: 991.98px) {
    .auth-page-wrapper .auth-one-bg-position { height: 300px; }
    .auth-page-content .card { margin-top: 1rem !important; }
}
@media (max-width: 575.98px) {
    .auth-page-wrapper { padding-top: 1rem !important; }
    .auth-page-wrapper .auth-one-bg-position { height: 230px; }
    .auth-page-content { padding-bottom: 80px; }
    .auth-page-content > .container { padding-inline: 12px; }
    .auth-page-content .card-body { padding: 1.25rem !important; }
    .auth-page-content .row > [class*="col-"] { padding-inline: 4px; }
    /* 16px controls: the browser does not zoom the page when a field gets focus */
    .auth-page-content .form-control, .auth-page-content .form-select, .auth-page-content .btn { font-size: 16px; min-height: 2.75rem; }
    .auth-page-content .mt-sm-5 { margin-top: 1rem !important; }
    .auth-page-content .auth-logo .fs-20 { font-size: 1.15rem !important; }
}
@media (max-height: 520px) and (orientation: landscape) {
    .auth-page-wrapper .auth-one-bg-position { height: 190px; }
}

/* ---- 6. Language switch on guest pages (Arabic / English) ---- */
.auth-lang { display: inline-flex; gap: .25rem; margin-top: .5rem; padding: .2rem; border-radius: 2rem; background: rgba(255,255,255,.14); }
.auth-lang-link { display: inline-block; min-width: 4.5rem; min-height: 2.25rem; padding: .35rem .9rem; border-radius: 2rem; color: #fff; font-weight: 500; line-height: 1.5; text-align: center; text-decoration: none; }
.auth-lang-link:hover { color: #fff; background: rgba(255,255,255,.2); }
.auth-lang-link.is-current { background: #fff; color: #1d3b57; }
.auth-lang-link:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
