/* Shared white action buttons. Load after theme and component styles.
 * Use one size modifier: small (tables/tools), standard (actions/forms),
 * or large (hero/end-of-game). Layout widths stay with their containers.
 */
:root {
    --button-background: #ffffff;
    --button-hover-background: #dce7ff;
    --button-active-background: #c6d8ff;
    --button-text: #071452;
    --button-disabled-background: #1c3284;
    --button-focus: #a6c9ff;
}

/* Filled blue secondary actions share a borderless treatment across the site. */
body#page-top .button-secondary:not(.site-button) {
    border: 0;
}

/* The page scope takes precedence over legacy game ID selectors. */
body#page-top .site-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    height: auto;
    min-height: var(--button-height, 44px);
    padding: var(--button-padding, 10px 20px);
    border: 0;
    border-radius: 999px;
    background: var(--button-background);
    box-shadow: none;
    color: var(--button-text);
    font-family: var(--font-body);
    font-size: var(--button-font-size, 14px);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.site-button--small {
    --button-height: 36px;
    --button-padding: 7px 16px;
    --button-font-size: 13px;
}

.site-button--standard {
    --button-height: 44px;
    --button-padding: 10px 20px;
    --button-font-size: 14px;
}

.site-button--large {
    --button-height: 52px;
    --button-padding: 13px 28px;
    --button-font-size: 16px;
}

.site-button--blue {
    --button-background: #132969d9;
    --button-hover-background: #253f85;
    --button-active-background: #193474;
    --button-text: #fff;
}

body#page-top .site-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) {
    background: var(--button-hover-background);
    color: var(--button-text);
    text-decoration: none;
}

body#page-top .site-button:active:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) {
    background: var(--button-active-background);
}

body#page-top .site-button:focus-visible {
    outline: 2px solid var(--button-focus);
    outline-offset: 4px;
    text-decoration: none;
}

/* Disabled form actions keep their white surface without hover effects. */
body#page-top .account-form .site-button {
    --button-disabled-background: #ffffff;
    --button-disabled-text: #7b849f;
}

body#page-top .site-button:disabled,
body#page-top .site-button[aria-disabled="true"],
body#page-top .site-button[aria-busy="true"] {
    border: 0;
    background: var(--button-disabled-background);
    background-image: none;
    opacity: 1;
    color: var(--button-disabled-text, var(--muted));
    cursor: not-allowed;
    text-decoration: none;
}

body#page-top .site-button[hidden] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    body#page-top .site-button {
        transition: none;
    }
}
