/* Accounts: login page, navbar account menu, Collect menu, toast, active buttons.
   Uses the --ff-* tokens from item-format-new.css. */

/* ---------- Navbar ---------- */
.ff-navbar-actions {
    position: relative;
}

/* Currency dropdown (figure-cards.js initCurrencyPicker), before the search box */
.ff-currency {
    height: 34px;
    padding: 0 26px 0 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--ff-text);
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23D7DCEA' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    appearance: none;
    cursor: pointer;
    color-scheme: dark;
}

.ff-currency:hover,
.ff-currency:focus-visible {
    border-color: var(--ff-gold);
    outline: none;
}

.ff-currency option {
    color: #fff;
    background: #0c0d0f;
}

.ff-profile-btn.is-signed-in {
    box-shadow: 0 0 0 2px var(--ff-gold);
}

.ff-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 40;
    min-width: 200px;
    padding: 8px;
    background: var(--ff-card);
    border: 1px solid var(--ff-card-border);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.ff-account-menu[hidden] {
    display: none;
}

.ff-account-menu__who {
    margin: 0;
    padding: 6px 10px 10px;
    font-size: 13px;
    color: var(--ff-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-bottom: 1px solid var(--ff-card-border);
}

.ff-account-menu__item {
    display: block;
    box-sizing: border-box;
    text-decoration: none;
    width: 100%;
    margin-top: 6px;
    padding: 9px 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    color: var(--ff-text);
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.ff-account-menu__item:hover,
.ff-account-menu__item:focus-visible {
    background: var(--ff-track);
    outline: none;
}

/* ---------- Toast ---------- */
.ff-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 100;
    max-width: calc(100vw - 32px);
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ff-text);
    background: #101114;
    border: 1px solid var(--ff-card-border);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ff-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- Login page ---------- */
.lg-page {
    display: flex;
    justify-content: center;
    padding: 48px 16px;
}

.lg-card {
    width: 100%;
    max-width: 400px;
    padding: 24px;
    background: var(--ff-card);
    border: 1px solid var(--ff-card-border);
    border-radius: 16px;
}

.lg-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--ff-track);
    border-radius: 12px;
}

.lg-tab {
    padding: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--ff-text-secondary);
    background: none;
    border: none;
    border-radius: 9px;
    cursor: pointer;
}

.lg-tab.is-active {
    color: #141417;
    background: var(--ff-gold);
}

.lg-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lg-form label {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ff-text-secondary);
}

.lg-form input {
    box-sizing: border-box;
    width: 100%;
    padding: 11px 12px;
    font: inherit;
    font-size: 15px;
    color: var(--ff-text);
    background: var(--ff-track);
    border: 1px solid var(--ff-card-border);
    border-radius: 8px;
    color-scheme: dark;
}

.lg-form input:focus-visible,
.lg-tab:focus-visible,
.lg-submit:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 2px;
}

.lg-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lg-field[hidden] {
    display: none;
}

/* "I'm 16 or older" tick box on sign-up and account setup */
.lg-form .lg-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.4;
    color: var(--ff-text);
    cursor: pointer;
}

.lg-form .lg-check[hidden] {
    display: none;
}

.lg-form .lg-check input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: var(--ff-gold);
}

/* White and underlined: gold small text fails contrast on the card blue */
.lg-check a {
    color: var(--ff-text);
    text-decoration: underline;
}

.lg-hint {
    margin: 0;
    font-size: 12px;
    color: var(--ff-text-secondary);
}

.lg-hint[hidden] {
    display: none;
}

.lg-submit {
    margin-top: 14px;
    padding: 12px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #141417;
    background: var(--ff-gold);
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.lg-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.lg-message {
    min-height: 1.4em;
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--ff-text-secondary);
}

.lg-message.is-error {
    color: #FFD2C4;
}

.lg-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ff-text-secondary);
}

.lg-divider::before,
.lg-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ff-card-border);
}

.lg-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #1f1f1f;
    background: #ffffff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.lg-google:hover {
    background: #f1f3f4;
}

.lg-google:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 2px;
}

.lg-google:disabled {
    opacity: 0.6;
    cursor: wait;
}

#auth-main[hidden],
#username-setup[hidden],
#reset-request[hidden],
#reset-new[hidden] {
    display: none;
}

/* Small text buttons: "Forgot password?" and "Back to sign in" */
.lg-link {
    align-self: flex-start;
    padding: 0;
    font: inherit;
    font-size: 13px;
    color: var(--ff-text);   /* gold is too dark for small text on the card blue */
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
}

.lg-link:hover {
    text-decoration-thickness: 2px;
}

.lg-link:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 2px;
}

.lg-link[hidden],
.lg-captcha[hidden] {
    display: none;
}

/* Turnstile bot check; empty until the widget loads */
.lg-captcha {
    margin-top: 8px;
}

.lg-captcha:empty {
    margin: 0;
}

.lg-setup-title {
    margin: 0 0 8px;
    font-size: 20px;
}

@media (prefers-reduced-motion: reduce) {
    .ff-toast {
        transition: none;
    }
}