/* Theme Switcher - shared styles loaded alongside any theme */

.theme-switcher {
    position: relative;
}

.theme-switcher-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
    line-height: 1;
}

/* Header gear button */
header .theme-switcher-btn {
    color: rgba(255, 255, 255, 0.8);
}

header .theme-switcher-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Auth page gear button (standalone) */
.theme-switcher-standalone {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1001;
}

.theme-switcher-standalone .theme-switcher-btn {
    background-color: rgba(0, 0, 0, 0.08);
    color: #555;
}

.theme-switcher-standalone .theme-switcher-btn:hover {
    background-color: rgba(0, 0, 0, 0.15);
}

/* Dark theme overrides for standalone button */
body[data-theme="1"] .theme-switcher-standalone .theme-switcher-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

body[data-theme="1"] .theme-switcher-standalone .theme-switcher-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Dropdown panel */
.theme-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    z-index: 3000;
    overflow: hidden;
}

.theme-dropdown.open {
    display: block;
}

.theme-dropdown-title {
    padding: 12px 16px 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-family: inherit;
    color: #333;
}

.theme-option:hover {
    background-color: #f5f5f5;
}

.theme-option.active {
    font-weight: 700;
}

.theme-option:last-child {
    margin-bottom: 8px;
}

.theme-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.theme-check {
    margin-left: auto;
    font-size: 14px;
    opacity: 0;
}

.theme-option.active .theme-check {
    opacity: 1;
}

/* Swatch colors for each theme */
.theme-swatch[data-theme="original"] {
    background: #1877f2;
}

.theme-swatch[data-theme="1"] {
    background: linear-gradient(135deg, #161b22, #00e5ff);
}

.theme-swatch[data-theme="2"] {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.theme-swatch[data-theme="3"] {
    background: #1e3a5f;
}

.theme-swatch[data-theme="4"] {
    background: linear-gradient(135deg, #2d6a4f, #52b788);
}

.theme-swatch[data-theme="5"] {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
}

/* Dark theme dropdown override */
body[data-theme="1"] .theme-dropdown {
    background: #161b22;
    border: 1px solid #30363d;
}

body[data-theme="1"] .theme-dropdown-title {
    color: #8b949e;
}

body[data-theme="1"] .theme-option {
    color: #e6edf3;
}

body[data-theme="1"] .theme-option:hover {
    background-color: #21262d;
}
