/* Light-touch UX refresh for legacy variant pages (Shatranj). Scoped to html.ux-variant.
   Uses --t-* theme vars + ux-tokens only; transform/opacity motion only. */

html.ux-variant #theme-info-container.theme-button {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    height: 40px;
    margin: 12px 0 10px auto;
    padding: 0 16px;
    border-radius: var(--ux-r-pill);
    font: 15px/1 var(--ux-font);
    letter-spacing: 0.01em;
    color: var(--t-on-surface);
    background: color-mix(in srgb, var(--t-accent-1) 62%, transparent);
    box-shadow: var(--ux-inset-top), var(--ux-shadow-1);
    opacity: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform var(--ux-d-fast) var(--ux-ease-out),
                background-color var(--ux-d-fast),
                box-shadow var(--ux-d-base) var(--ux-ease-out);
}

/* CSS chevron replaces the unicode triangle; rotates when open */
html.ux-variant #theme-info-container.theme-button::after,
html.ux-variant #theme-info-container.theme-button-selected::after {
    content: "" !important;
    width: 7px;
    height: 7px;
    margin: -3px -2px 0 0;
    font-size: 0;
    border: solid currentColor;
    border-width: 0 1.75px 1.75px 0;
    transform: rotate(45deg);
    transition: transform var(--ux-d-base) var(--ux-ease-out);
}

html.ux-variant #theme-info-container.theme-button-selected::after {
    transform: rotate(225deg);
    margin-top: 3px;
}

html.ux-variant #theme-info-container.theme-button:hover {
    background: var(--t-accent-1);
    transform: translateY(-1px);
    box-shadow: var(--ux-inset-top), var(--ux-shadow-2);
}

html.ux-variant #theme-info-container.theme-button:active {
    transform: translateY(0) scale(0.97);
}

html.ux-variant #theme-info-container.theme-button:focus-visible {
    outline: 2px solid var(--t-accent-2);
    outline-offset: 2px;
}

html.ux-variant #theme-info-container.theme-button-selected {
    background: var(--t-accent-2);
    color: var(--t-on-accent-2);
}

/* Board card: shadow stack + rounded dock bottom (desktop/tablet; mobile stays full-bleed).
   The board keeps its own top corners (chess_board.css, 5px) and clips itself. The container must stay
   unpositioned and unclipped: the share overlay (_Share.cshtml) lives inside the dock and is laid out against
   <html>, as before the redesign; position/overflow here pinned it to the board and cut it off. */
@media (min-width: 768px) {
    html.ux-variant .chess-board-container {
        border-radius: 5px 5px var(--ux-r-board) var(--ux-r-board);
        box-shadow: var(--ux-shadow-board), 0 0 0 1px rgb(255 255 255 / 0.06);
    }

    html.ux-variant .chess-board-container > .daily-footer {
        border-bottom-left-radius: var(--ux-r-board);
        border-bottom-right-radius: var(--ux-r-board);
    }
}

@media (prefers-reduced-motion: reduce) {
    html.ux-variant #theme-info-container.theme-button,
    html.ux-variant #theme-info-container.theme-button::after {
        transition: none;
    }
}
