/* ============================================================
   OnFire Share – login.css (login.html only)
   Three sign-in methods, matching app.onfire.so/login:
   Password · Phone (passwordless) · QR code. Light theme, the
   same tokens as style.css (#FF6B1F primary, #222 text, #707781
   secondary). Every button is a pill.
   ============================================================ */

#login-view {
    max-width: 420px;
    text-align: left;
    padding: 32px 4px;
}

#login-view .login-title,
#login-view .login-caption {
    text-align: center;
}

.lg-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* --- Method tabs: a segmented pill control --- */
.lg-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    margin-bottom: 20px;
    background: #ebebef;
    border-radius: 9999px;
}

.lg-tab {
    height: 38px;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #707781;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s cubic-bezier(0.215, 0.61, 0.355, 1),
                color 0.2s cubic-bezier(0.215, 0.61, 0.355, 1),
                box-shadow 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.lg-tab:hover {
    color: #222222;
}

.lg-tab[aria-selected="true"] {
    background: #ffffff;
    color: #222222;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.lg-tab:focus-visible,
.lg-button:focus-visible,
.lg-back:focus-visible {
    outline: 2px solid #FF6B1F;
    outline-offset: 2px;
}

/* --- Panels / steps --- */
.lg-panel,
.lg-step {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05);
    animation: lg-in 0.24s cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes lg-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lg-panel, .lg-step { animation: none; }
    .lg-tab, .lg-button, .lg-input { transition: none; }
}

#panel-qr {
    text-align: center;
}

#panel-qr .qr-card {
    box-shadow: none;
    border: 1px solid #ebebef;
    margin: 4px 0 16px;
}

/* --- Fields --- */
.lg-label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #222222;
}

.lg-label + .lg-input {
    margin-bottom: 14px;
}

.lg-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d9d9df;
    border-radius: 12px;
    background: #ffffff;
    color: #222222;
    font: inherit;
    font-size: 16px; /* 16px stops iOS zooming into the field */
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lg-input::placeholder {
    color: #a3a7ae;
}

.lg-input:focus {
    outline: none;
    border-color: #FF6B1F;
    box-shadow: 0 0 0 3px rgba(255, 107, 31, 0.18);
}

.lg-input[aria-invalid="true"] {
    border-color: #FF3B30;
}

.lg-code {
    height: 56px;
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.5em;
    padding-left: calc(14px + 0.5em); /* re-centre: letter-spacing pads the right */
    font-variant-numeric: tabular-nums;
}

.lg-hint {
    margin: -8px 0 14px;
    font-size: 12.5px;
    line-height: 1.45;
    color: #707781;
}

.lg-center {
    text-align: center;
    margin: 0 0 12px;
}

.lg-error {
    min-height: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #d70015;
}

.lg-error:not(:empty) {
    margin: 2px 0 12px;
}

.lg-footnote {
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.45;
    color: #8e929a;
    text-align: center;
}

/* --- Buttons: pills --- */
.lg-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 9999px;
    background: #FF6B1F;
    color: #ffffff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.2s ease;
}

.lg-button:hover {
    background: #e55a10;
}

.lg-button:active {
    transform: scale(0.98);
}

.lg-button[disabled] {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.lg-button-secondary {
    background: #f1f1f4;
    color: #222222;
}

.lg-button-secondary:hover {
    background: #e6e6ea;
}

.lg-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: -6px 0 12px -6px;
    padding: 4px 10px;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #707781;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.lg-back:hover {
    color: #222222;
    background: #f1f1f4;
}

.lg-step-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #222222;
    margin-bottom: 6px;
}

.lg-step-body {
    font-size: 14px;
    line-height: 1.5;
    color: #707781;
    margin-bottom: 18px;
}

@media (max-width: 600px) {
    #login-view {
        padding: 16px 0;
    }

    .lg-panel,
    .lg-step {
        padding: 20px 16px;
    }
}

/* --- "Continue with Google" (onfiremobile-3gbw8.10) ---
   login-google.js renders Google's own button (GIS iframe, pill shape) into
   #google-signin-btn and unhides #google-signin when Google sign-in is on. */
.lg-google {
    margin-bottom: 18px;
}

.lg-google-btn {
    display: flex;
    justify-content: center;
    min-height: 44px;
    margin-bottom: 12px;
    transition: opacity 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* An attempt is in flight: inert until a fresh nonce is ready. */
.lg-google[aria-busy="true"] .lg-google-btn {
    opacity: 0.55;
    pointer-events: none;
}

.lg-or {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #707781;
}

.lg-or::before,
.lg-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e3e3e8;
}

@media (prefers-reduced-motion: reduce) {
    .lg-google-btn {
        transition: none;
    }
}
