/**
 * Styles for the theme picker modal injected by theme-bridge.js.
 * Namespaced under .sitrack-theme-* so it cannot collide with site3/site5/core classes.
 */
.sitrack-theme-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, Helvetica, sans-serif;
}

.sitrack-theme-dialog {
    background: #ffffff;
    color: #222222;
    width: 320px;
    max-width: 90vw;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    padding: 20px;
}

.sitrack-theme-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: bold;
}

.sitrack-theme-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sitrack-theme-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background: #f7f7f7;
    cursor: pointer;
}

.sitrack-theme-option:hover {
    background: #eeeeee;
}

.sitrack-theme-option.is-active {
    border-color: #2b3f51;
    background: #e4ebf0;
}

.sitrack-theme-option-label {
    font-weight: bold;
    font-size: 14px;
}

.sitrack-theme-option-description {
    font-size: 12px;
    color: #555555;
    margin-top: 2px;
}

.sitrack-theme-close {
    margin-top: 16px;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
}

.sitrack-theme-close:hover {
    background: #f2f2f2;
}

/*
 * Live theme switches run inside a View Transition (see theme-bridge.js):
 * the browser keeps showing the previous theme while the new one finishes
 * computing, then crossfades. Keep that crossfade short.
 */
:root[data-sitrack-theme-switching]::view-transition-old(root),
:root[data-sitrack-theme-switching]::view-transition-new(root) {
    animation-duration: 100ms;
}

/* Theme buttons are locked while a switch is still running. */
.sitrack-theme-option:disabled {
    cursor: wait;
}

.sitrack-theme-option:disabled:hover {
    background: #f7f7f7;
}

.sitrack-theme-option.is-active:disabled:hover {
    background: #e4ebf0;
}
