/* Theme Shared — Theme toggle and dropdown styles used across all themes */

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: 1px solid var(--nn-border);
    color: var(--nn-text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    line-height: 1;
    border-radius: 0.375rem;
    transition: all 200ms;
    display: flex;
    align-items: center;
}
.theme-toggle:hover {
    color: var(--nn-text);
    border-color: var(--nn-border-hover);
}
[data-theme="floppy"] .theme-toggle {
    border: 2px solid #222;
    box-shadow: 2px 2px 0 #222;
}
[data-theme="floppy"] .theme-toggle:hover {
    background: #e8e8e8;
    box-shadow: 1px 1px 0 #222;
    transform: translate(1px, 1px);
}

[data-theme="liquid"] .theme-toggle {
    border: 1px solid rgba(233, 213, 255, 0.5);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
}
[data-theme="liquid"] .theme-toggle:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
}

/* Theme dropdown */
.theme-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}
.theme-dropdown-btn {
    background: none;
    border: 1px solid var(--nn-border);
    color: var(--nn-text-muted);
    cursor: pointer;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    border-radius: 0.375rem;
    transition: all 200ms;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}
.theme-dropdown-btn:hover {
    color: var(--nn-text);
    border-color: var(--nn-border-hover);
}
.theme-dropdown-btn .caret {
    font-size: 0.55rem;
    transition: transform 200ms;
}
.theme-dropdown.open .caret { transform: rotate(180deg); }

.theme-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 130px;
    background: var(--nn-surface);
    border: 1px solid var(--nn-border);
    border-radius: 0.5rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    padding: 0.25rem;
    list-style: none;
    margin: 0;
}
.theme-dropdown.open .theme-dropdown-menu { display: block; }

.theme-dropdown-menu li {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    color: var(--nn-text-muted);
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 150ms;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.theme-dropdown-menu li:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--nn-text);
}
.theme-dropdown-menu li.active {
    color: var(--nn-green);
    font-weight: 600;
}
.theme-dropdown-menu li .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

[data-theme="floppy"] .theme-dropdown-btn {
    border: 2px solid #222;
    box-shadow: 2px 2px 0 #222;
    border-radius: 0;
}
[data-theme="floppy"] .theme-dropdown-btn:hover {
    background: #e8e8e8;
    box-shadow: 1px 1px 0 #222;
    transform: translate(1px, 1px);
}
[data-theme="floppy"] .theme-dropdown-menu {
    background: #fff;
    border: 2px solid #222;
    box-shadow: 4px 4px 0 #222;
    border-radius: 0;
}
[data-theme="floppy"] .theme-dropdown-menu li { border-radius: 0; }
[data-theme="floppy"] .theme-dropdown-menu li:hover { background: #e8e8e8; }

[data-theme="liquid"] .theme-dropdown-btn {
    border: 1px solid rgba(233, 213, 255, 0.5);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 9999px;
}
[data-theme="liquid"] .theme-dropdown-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
}
[data-theme="liquid"] .theme-dropdown-menu {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(233, 213, 255, 0.4);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.1);
    border-radius: 1rem;
}
[data-theme="liquid"] .theme-dropdown-menu li:hover {
    background: rgba(233, 213, 255, 0.3);
}
