.theme-preview-source[hidden] {
    display: none !important;
}

.theme-choice-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.theme-choice {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.45rem 0.65rem;
    border: 1px solid #cbd1d6;
    border-radius: 5px;
    background: #fff;
    color: #27313a;
    text-align: left;
    cursor: pointer;
}

.theme-choice:hover,
.theme-choice[aria-checked="true"] {
    border-color: var(--theme-primary);
}

.theme-choice[aria-checked="true"] {
    box-shadow: inset 0 0 0 1px var(--theme-primary);
}

.theme-choice:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--theme-primary), transparent 65%);
    outline-offset: 2px;
}

.theme-choice-swatch {
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    border: 3px solid var(--theme-dark);
    border-radius: 50%;
    background: var(--theme-primary);
    box-shadow: inset 0 0 0 3px #fff;
}

.theme-preview-popover {
    position: fixed;
    z-index: 1100;
    width: 220px;
    padding: 0.7rem;
    border: 1px solid #d5dadd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(24, 34, 40, 0.2);
    pointer-events: none;
}

.theme-preview-popover[hidden] {
    display: none;
}

.theme-preview-title {
    margin: 0 0 0.5rem;
    color: #27313a;
    font-size: 0.8rem;
    font-weight: 700;
}

.theme-preview-sample {
    overflow: hidden;
    border: 1px solid #e1e5e8;
    border-radius: 4px;
}

.theme-preview-header {
    height: 28px;
    background: var(--theme-dark);
}

.theme-preview-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 47px;
    padding: 0.5rem;
    color: #27313a;
    font-size: 0.7rem;
}

.theme-preview-order {
    padding: 0.25rem 0.45rem;
    border-radius: 3px;
    background: var(--theme-primary);
    color: #fff;
    font-weight: 700;
}

.theme-preview-accent {
    width: 17px;
    height: 17px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    background: var(--theme-accent);
}

@media (max-width: 575.98px) {
    .theme-choice-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}