/*
 * Login / register form styling.
 *
 * These two pages render inside the shared grey.ooo chrome but have no sidebar
 * and no host-app utility classes worth depending on. They are styled from the
 * --warm-* tokens (warm-field.css) rather than the brand kit's --gooo-* set,
 * because they sit on the same warm field as the splash and the cool palette
 * cuts straight across it. The two bars above keep --gooo-*. Kept out of app.css
 * (which is
 * imported globally through app.js) because nothing else needs it — the layout
 * pulls it in per-page via {% block stylesheets %}.
 */

/*
 * The warm field, same paint as the splash (warm-field.css). .gooo-main is the
 * region below the two bars — the counterpart of the splash's <main> under the
 * brand bar — and it already stretches to the viewport, so it needs the
 * background and nothing else.
 *
 * Targeting a brand-kit class from here is safe because this stylesheet is
 * pulled in per-page by {% block stylesheets %} and only login and register
 * pull it: .gooo-main on the signed-in pages never sees these rules. The two
 * bars above keep the grey.ooo palette, exactly as they do on the splash.
 */
.gooo-main {
    background-color: var(--warm-base);
    background-image: var(--warm-field-image);
}

/*
 * The PrintShop app bar (second tier, below the shared grey.ooo brand bar) is
 * this app's own chrome, not the brand kit's — unlike .gooo-topbar, overriding
 * its background does not touch anything the brandkit-conformance job checks.
 * Same per-page scoping argument as .gooo-main above.
 */
.gooo-appbar {
    background: var(--warm-on-accent);
    border-bottom-color: var(--warm-hairline);
}

.gooo-appbar__title {
    color: var(--warm-ink);
}

/*
 * The form card and the footer are brand-kit components, so on the warm pages
 * they arrive in the cool palette and read as pasted on. Same per-page scoping
 * argument as .gooo-main above. The card takes the splash card's treatment
 * verbatim — translucent black over the field rather than an opaque panel — so
 * the weave and centre glow carry through it.
 */
/*
 * Nothing declares color-scheme, so the browser draws native widgets light: the
 * "remember me" and "agree terms" boxes came out as stark white squares on the
 * field. accent-color only reaches the *checked* state, so the unchecked box
 * needs this to sit down into the page.
 */
html {
    color-scheme: dark;
}

.gooo-card {
    background: var(--warm-surface);
    border-color: var(--warm-hairline);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.2);
}

.gooo-footer {
    border-top-color: var(--warm-hairline);
    color: var(--warm-faint);
}

.gooo-footer a {
    color: var(--warm-muted);
}

.gooo-footer a:hover {
    color: var(--warm-ink);
}

.auth {
    max-width: 26rem;
    margin: clamp(1rem, 6vh, 4rem) auto;
}

.auth__title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--warm-ink);
}

.auth__lede {
    margin: 0 0 1.4rem;
    font-size: 0.88rem;
    color: var(--warm-muted);
}

.auth__field {
    margin-bottom: 0.95rem;
}

/* .auth__label is the hand-written login markup; the bare `label` covers the
   bootstrap_5 form theme's output on the register form, whose own .form-label
   class is inert here (no Bootstrap CSS is loaded). */
.auth__label,
.auth__field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--warm-ink);
}

/* The terms checkbox comes through form_row as a label+input pair. */
.auth__check label {
    margin: 0;
    font-size: 0.85rem;
    color: var(--warm-ink);
}

.auth__check .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Covers both hand-written inputs (login) and Symfony form_row output
   (register), which emits bare <input>/<select> with no class of its own. */
.auth input[type="text"],
.auth input[type="email"],
.auth input[type="password"],
.auth select {
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--gooo-radius-sm);
    border: 1px solid var(--warm-border);
    background: var(--warm-recess);
    color: var(--warm-ink);
    font: inherit;
    font-size: 0.9rem;
}

.auth input[type="text"]:focus,
.auth input[type="email"]:focus,
.auth input[type="password"]:focus,
.auth select:focus {
    outline: none;
    border-color: var(--warm-accent);
    box-shadow: 0 0 0 3px var(--warm-accent-dim);
}

.auth input::placeholder {
    color: var(--warm-faint);
}

.auth__check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--warm-ink);
}

.auth__check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--warm-accent);
}

/*
 * Register's checkbox comes from the Tailwick form theme wearing
 * `appearance-none` and a cool slate fill, so it ignored accent-color above and
 * stayed a pale square on the field while login's went dark. Handing it back to
 * the browser makes the two render identically — dark from color-scheme,
 * brass when checked.
 */
.auth__check input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: auto;
    background-color: initial;
    border: initial;
    border-radius: initial;
}

/*
 * Restates gooo-btn--primary's colours instead of relying on it alone: app.css
 * (Tailwind preflight) is injected by AssetMapper at runtime, so it lands after
 * brand-kit.css in the cascade and resets `button` background/color. An <a>
 * styled .gooo-btn--primary is unaffected, a <button> is — hence the explicit
 * declarations here.
 */
.auth__submit {
    width: 100%;
    justify-content: center;
    margin-top: 1.2rem;
    padding: 10px 14px;
    font-size: 0.92rem;
    background: var(--warm-accent);
    color: var(--warm-on-accent);
    border: 1px solid var(--warm-accent);
    font-weight: 600;
}

.auth__submit:hover {
    filter: brightness(1.08);
}

.auth__alt {
    margin: 1.1rem 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--warm-muted);
}

.auth__alt a {
    color: var(--warm-accent);
    text-decoration: none;
}

.auth__alt a:hover {
    text-decoration: underline;
}

.auth__error {
    margin-bottom: 1rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--gooo-radius-sm);
    border: 1px solid var(--warm-danger-border);
    background: var(--warm-danger-bg);
    color: var(--warm-danger);
    font-size: 0.85rem;
}

/* Symfony's form theme emits <ul> error lists above the offending widget. */
.auth ul {
    margin: 0 0 0.5rem;
    padding-left: 1.1rem;
    color: var(--warm-danger);
    font-size: 0.82rem;
}
