/* 主題色彩選擇器（header 調色盤圖示開啟） */
#theme-picker-dialog {
    position: fixed;
    top: 58px;
    right: 18px;
    z-index: 10000;
}

.theme-picker-content {
    position: relative;
    width: 284px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e0e1e6;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.theme-picker-tip {
    position: absolute;
    top: -8px;
    right: 22px;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-left: 1px solid #e0e1e6;
    border-top: 1px solid #e0e1e6;
    transform: rotate(45deg);
}

.theme-picker-title {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.theme-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.theme-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 4px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.theme-swatch:hover {
    background: rgba(0, 0, 0, 0.04);
}

.theme-swatch-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 32px;
    border-radius: 7px;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.theme-swatch-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.theme-swatch-label {
    font-size: 11px;
    line-height: 1;
    color: #666;
}

.theme-swatch.active .theme-swatch-chip {
    outline: 2px solid var(--theme-accent);
    outline-offset: 1px;
}

.theme-swatch.active .theme-swatch-label {
    color: var(--theme-accent);
    font-weight: 600;
}

/* 深色基底下的選擇器外觀 */
body.fcj-dark .theme-picker-content {
    background: var(--dm-surface, #232834);
    border-color: var(--dm-border, #343c4b);
}

body.fcj-dark .theme-picker-tip {
    background: var(--dm-surface, #232834);
    border-color: var(--dm-border, #343c4b);
}

body.fcj-dark .theme-picker-title {
    color: var(--dm-text, #e8ecf3);
}

body.fcj-dark .theme-swatch:hover {
    background: rgba(255, 255, 255, 0.06);
}

body.fcj-dark .theme-swatch-label {
    color: var(--dm-text-dim, #aeb6c4);
}

/* 進出場動畫 */
.theme-picker-enter {
    transition: all 0.18s ease-out;
}

.theme-picker-enter-start {
    opacity: 0;
    transform: translateY(-8px);
}

.theme-picker-enter-end {
    opacity: 1;
    transform: translateY(0);
}

.theme-picker-leave {
    transition: all 0.12s ease-in;
}

.theme-picker-leave-start {
    opacity: 1;
    transform: translateY(0);
}

.theme-picker-leave-end {
    opacity: 0;
    transform: translateY(-8px);
}
