/* @file Shared button system: unframed actions, scoped dividers and calm primary actions. */
:root {
    --button-primary-fill: color-mix(in srgb, var(--gold) 12%, var(--panel));
    --button-primary-hover: color-mix(in srgb, var(--gold) 20%, var(--panel));
}
:root:root body button,
:root:root body summary[role='button'] {
    min-height: 44px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        color 120ms ease;
}
/* Dividers are reserved for chat and navigation. */
:root:root body :where(#chat, #tabs:not([data-nav-display='icons']), .character-sections) button,
:root:root body button:where([data-private-player]),
:root:root
    body
    summary[role='button']:where(#chat *):not(:where(.item-book-action-menu > summary)) {
    border-bottom: 1px solid var(--line);
}

:root:root body :is(button.chat-author, button.chat-mention) {
    display: inline;
    min-height: 0;
    padding: 0;
    border: 0;
    font: inherit;
    font-weight: 700;
}

:root:root body :is(button.chat-author, button.chat-mention):hover {
    color: var(--gold);
}

:root:root body button:not(:disabled):hover,
:root:root body summary[role='button']:hover {
    border-bottom-color: var(--gold);
}
:root:root
    body
    :is(
        button.primary,
        button[data-button-kind='primary'],
        button[data-siege-attack],
        button[data-training-action='fight'],
        button[data-confirm-potions],
        button[value='confirm'],
        #battleResult button[data-button-kind='primary']
    ) {
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--button-primary-fill);
    color: inherit;
    font-weight: 600;
}
:root:root
    body
    :is(
        button.primary,
        button[data-button-kind='primary'],
        button[data-siege-attack],
        button[data-training-action='fight'],
        button[data-confirm-potions],
        button[value='confirm'],
        #battleResult button[data-button-kind='primary']
    ):not(:disabled):hover {
    background: var(--button-primary-hover);
}
:root:root
    body
    :is(
        button.scenic-city-pin,
        button.item-book-close,
        button[data-button-kind='icon'],
        button[aria-label^='Закрыть'],
        button[aria-label='Действия'],
        button:has(> .game-info-icon),
        summary:has(> .game-info-icon),
        #gameHeader #menu,
        #gameHeader #close,
        #help #dismiss,
        #tabs[data-nav-display='icons'] button
    ) {
    min-width: 44px;
    min-height: 44px;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
}

:root:root body .inventory-rail button,
:root:root body .bag-heading > button[data-delete-manager] {
    border: 0;
}

/* Map destinations retain their circular artwork geometry as unframed icons. */
:root:root body button.scenic-city-pin {
    border-radius: 50%;
}
:root:root body button:focus-visible,
:root:root body summary[role='button']:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}
:root:root body button[aria-pressed='true'],
:root:root body button[aria-current='page'] {
    color: var(--gold);
    border-bottom-color: var(--gold);
}
:root:root body button:disabled {
    opacity: 0.45;
    cursor: default;
}
:root:root body button:not(:disabled):active {
    filter: brightness(0.92);
}
@media (prefers-reduced-motion: reduce) {
    :root:root body button,
    :root:root body summary[role='button'] {
        transition: none;
    }
}
