/* ==========================================================================
   THEME.CSS - Theme Modal, Gradient Swatches, Color Pickers
   ========================================================================== */

/* --- THEME MODAL STYLES --- */
#theme-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: color-mix(in srgb, var(--card-bg, rgba(15,23,42,0.6)) 45%, rgba(2,6,23,0.9) 55%);
    backdrop-filter: blur(4px);
    z-index: 6000;
    display: none;
    justify-content: center;
    align-items: center;
}

#theme-modal.active {
    display: flex;
}

.theme-modal-content {
    background: var(--card-bg, rgba(15, 23, 42, 0.6));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--bd, #334155);
    padding: 2rem;
    border-radius: 24px;
    width: 450px;
    max-width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    position: relative;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.theme-modal-content::-webkit-scrollbar {
    display: none;
}

.theme-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bd, #334155);
}

.theme-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.theme-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.gradient-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.grad-swatch {
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
}

.grad-swatch:hover {
    transform: scale(1.1);
}

.grad-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.color-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.color-row span {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.custom-grad-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    background: color-mix(in srgb, var(--card-bg, rgba(15, 23, 42, 0.6)) 88%, white 12%);
    padding: 8px;
    border-radius: 8px;
}

.custom-grad-label {
    font-size: 0.85rem;
    color: #cbd5e1;
}

#reset-theme-btn {
    width: 100%;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    padding: 10px;
}

#reset-theme-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}
