/* Shared dropdown surfaces. Component libraries continue to own selection and placement. */
:root {
    --quiz-dd-surface: #18252d;
    --quiz-dd-border: #3b515d;
    --quiz-dd-text: #d9e5ec;
    --quiz-dd-muted: #96adbb;
    --quiz-dd-hover: #263d45;
    --quiz-dd-selected: #213f3d;
    --quiz-dd-accent: #77d8c5;
}
html body select:not([multiple]):not([size]) {
    --legacy-font-weight-cap: 400;
    color-scheme: dark;
    background-color: #14212a;
    border-color: var(--quiz-dd-border);
    border-radius: 4px;
    color: var(--quiz-dd-text);
    font-family: Inter, sans-serif!important;
    font-weight: 400!important;
    letter-spacing: 0!important;
    text-transform: none;
    cursor: pointer;
}
html body select :is(option, optgroup) {
    color: var(--quiz-dd-text); background: var(--quiz-dd-surface);
    font-family: Inter, sans-serif; font-weight: 400!important; letter-spacing: 0;
}
html body select option:checked { color: #dcf6ef; background: var(--quiz-dd-selected); }
html body select option:disabled { color: #788f9d; }
html body select:disabled { cursor: default; opacity: .55; }
html body select:focus-visible { outline: 2px solid var(--quiz-dd-accent); outline-offset: 2px; }

html body .mdc-menu.mdc-menu-surface,
html body :is(.actions-menu, .custom-dropdown, .dropdown-menu, .constructor-question-menu, .mobile-more-menu__list),
html body .tox .tox-menu {
    --legacy-font-weight-cap: 400;
    background: var(--quiz-dd-surface)!important; border: 1px solid var(--quiz-dd-border)!important;
    border-radius: 6px!important; box-shadow: 0 14px 36px #0006!important;
    color: var(--quiz-dd-text); scrollbar-color: #526d79 var(--quiz-dd-surface);
}
html body .mdc-select .mdc-select__menu {
    max-height: min(360px, calc(100dvh - 24px)); overflow-y: auto; overflow-x: hidden;
}
html body .mdc-menu :is(.mdc-deprecated-list, .mdc-list, .mdc-deprecated-list-item, .mdc-list-item) { box-sizing: border-box; }
html body .mdc-menu :is(.mdc-deprecated-list, .mdc-list) { padding: 5px; color: var(--quiz-dd-text); }
html body .mdc-menu :is(.mdc-deprecated-list-item, .mdc-list-item) {
    min-height: 42px; height: auto; padding: 10px 12px; border-radius: 3px;
    color: var(--quiz-dd-text)!important; background: transparent;
    font: 400 14px/1.5 Inter, sans-serif!important; letter-spacing: 0!important;
    text-transform: none; align-items: center; white-space: normal; overflow-wrap: anywhere;
}
html body .mdc-menu :is(.mdc-deprecated-list-item__text, .mdc-list-item__text) {
    min-width: 0; color: inherit; font: inherit!important; white-space: normal; overflow-wrap: anywhere;
}
html body .mdc-menu :is(.mdc-deprecated-list-item, .mdc-list-item):hover,
html body .mdc-menu :is(.mdc-deprecated-list-item, .mdc-list-item):focus-visible { background: var(--quiz-dd-hover)!important; }
html body .mdc-menu :is(.mdc-deprecated-list-item--selected, .mdc-deprecated-list-item--activated, [aria-selected="true"]) {
    color: #b6efdf!important; background: var(--quiz-dd-selected)!important;
}
html body .mdc-menu :is(.mdc-deprecated-list-item--disabled, [aria-disabled="true"]) { opacity: .45; cursor: default; }
html body .mdc-menu :is(.mdc-deprecated-list-item, .mdc-list-item):focus-visible { outline: 2px solid var(--quiz-dd-accent); outline-offset: -2px; }
html body .mdc-menu :is(.mdc-deprecated-list-item__graphic, .mdc-menu__selection-group-icon) { color: var(--quiz-dd-muted); }
html body .mdc-menu .profile-menu-item--logout { color: #eeaab6!important; }
html body .mdc-menu.balance-dropdown-menu {
    width: 208px; min-width: 192px; max-width: calc(100vw - 24px);
    max-height: min(320px, calc(100dvh - 24px)); padding: 0;
    z-index: 10080!important; overflow-x: hidden; overflow-y: auto;
}
html body .balance-dropdown-menu .mdc-deprecated-list { margin: 0; padding: 5px; outline: none; }
html body .balance-dropdown-menu .balance-menu-item {
    display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 12px;
    min-height: 44px; margin: 0; padding: 10px 12px; cursor: pointer;
}
html body .balance-dropdown-menu .balance-menu-icon {
    position: static; display: block; width: 20px; height: 20px; margin: 0; padding: 0;
    color: var(--quiz-dd-muted); font-size: 20px; line-height: 20px; transform: none;
}
html body .balance-dropdown-menu .mdc-deprecated-list-item__text { grid-column: 2; min-width: 0; }
html body .balance-dropdown-menu .balance-menu-item:hover .balance-menu-icon,
html body .balance-dropdown-menu .balance-menu-item:focus-visible .balance-menu-icon { color: var(--quiz-dd-accent); }
html body .balance-dropdown-menu .mdc-deprecated-list-item__ripple::before,
html body .balance-dropdown-menu .mdc-deprecated-list-item__ripple::after { opacity: 0!important; }
html body [data-balance-dropdown] > button:focus-visible { outline: 2px solid var(--quiz-dd-accent); outline-offset: 3px; }
html body .mdc-select__menu :is(.mdc-deprecated-list-item__ripple, .mdc-deprecated-list-item)::before,
html body .mdc-select__menu :is(.mdc-deprecated-list-item__ripple, .mdc-deprecated-list-item)::after { opacity: 0!important; }
html body .constructor-premium #themes_id > .mdc-select__menu {
    background: var(--quiz-dd-surface)!important; border-color: var(--quiz-dd-border)!important; border-radius: 6px!important;
}
html body .constructor-premium #themes_id > .mdc-select__menu .mdc-deprecated-list { padding: 5px!important; }
html body .constructor-premium #themes_id > .mdc-select__menu .mdc-deprecated-list-item { padding: 10px 12px!important; }
html body .constructor-premium #themes_id > .mdc-select__menu .mdc-deprecated-list-item--selected {
    color: #b6efdf!important; background: var(--quiz-dd-selected)!important;
}
html body .constructor-premium #themes_id > .mdc-select__menu .mdc-deprecated-list-item:hover,
html body .constructor-premium #themes_id > .mdc-select__menu .mdc-deprecated-list-item:focus-visible { background: var(--quiz-dd-hover)!important; }

html body :is(.actions-menu, .custom-dropdown, .dropdown-menu) {
    width: 200px; min-width: 200px; max-width: calc(100vw - 16px); padding: 5px; animation: none;
    max-height: calc(100dvh - 16px); overflow-y: auto; overflow-x: hidden;
}
html body :is(.actions-menu, .custom-dropdown, .dropdown-menu, .constructor-question-menu) button {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; height: auto;
    margin: 0; padding: 9px 10px; border: 0; border-radius: 3px;
    background: transparent; box-shadow: none; color: var(--quiz-dd-text);
    font: 400 14px/1.5 Inter, sans-serif!important; text-transform: none; letter-spacing: 0!important;
    white-space: normal; overflow-wrap: anywhere; text-align: left; cursor: pointer;
}
html body :is(.actions-menu, .custom-dropdown, .dropdown-menu) button span:not(.material-symbols-outlined) { font-weight: 400!important; }
html body :is(.actions-menu, .custom-dropdown, .dropdown-menu, .constructor-question-menu) button:hover { background: var(--quiz-dd-hover)!important; }
html body :is(.actions-menu, .custom-dropdown, .dropdown-menu, .constructor-question-menu) button:focus-visible { outline: 2px solid var(--quiz-dd-accent); outline-offset: -2px; background: var(--quiz-dd-hover)!important; }
html body :is(.actions-menu, .custom-dropdown, .dropdown-menu) .material-symbols-outlined {
    flex: 0 0 20px; width: 20px; height: 22px; margin: 0; color: var(--quiz-dd-muted)!important;
    font-size: 20px!important; line-height: 22px;
}
html body :is(.actions-menu, .dropdown-menu) :is(.del-btn, [data-constructor-action="delete-question"], [data-constructor-action="delete-structure"], [data-delete-vict]) {
    color: #eeaab6; border-top: 1px solid #354751; margin-top: 4px; border-radius: 0 0 3px 3px;
}
html body :is(.actions-menu-btn, [data-dropdown-toggle]) {
    color: #a9c0cd; border: 1px solid #344b57; border-radius: 4px; background: #17262f;
    box-shadow: none; min-width: 32px; min-height: 32px;
}
html body :is(.actions-menu-btn, [data-dropdown-toggle]):hover { color: #b5ecdf; border-color: #6b9e99; background: #263c43; }
html body :is(.actions-menu-btn, [data-dropdown-toggle]):focus-visible { outline: 2px solid var(--quiz-dd-accent); outline-offset: 2px; }
html body #tree_container .tree-node-row > .actions-menu-btn {
    display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; min-width: 28px; min-height: 28px;
    margin: 0 0 0 auto; padding: 0; box-sizing: border-box; background: transparent; border-color: transparent;
}
html body #tree_container .tree-node-row > .actions-menu-btn .material-symbols-outlined { width: 18px; height: 18px; font-size: 18px; line-height: 18px; }
html body [data-dropdown-toggle] svg { fill: currentColor; }
html body [data-dropdown-toggle] svg circle { fill: currentColor; }

html body .tox .tox-menu { padding: 5px; }
html body .tox .tox-collection--list .tox-collection__item {
    min-height: 40px; padding: 8px 10px; border-radius: 3px; background: transparent; color: var(--quiz-dd-text);
}
html body .tox .tox-collection--list .tox-collection__item-label { font-family: Inter, sans-serif; letter-spacing: 0; }
html body .tox .tox-collection--list :is(.tox-collection__item--active, .tox-collection__item--enabled) { background: var(--quiz-dd-hover); color: var(--quiz-dd-text); }
html body .tox .tox-collection__group { border-color: #354751; }
html body .tox :is(.tox-collection__item-icon, .tox-collection__item-checkmark, .tox-collection__item-caret) { color: var(--quiz-dd-muted); }
html body .swal2-select { border: 1px solid var(--quiz-dd-border); border-radius: 4px; color: var(--quiz-dd-text); background: #14212a; color-scheme: dark; }
