/* ==========================================================================
   DESA RAMBIPUJI - THEME SWITCHER FLOATING FAB & RGB SLIDER CSS (2026)
   ========================================================================== */

/* Floating Theme Switcher Button (Fixed Bottom-Right Position) */
.theme-floating-fab {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    top: auto !important;
    left: auto !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: var(--primary, #0057A6) !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    box-shadow: var(--shadow-glow-theme, 0 8px 24px rgba(0, 87, 166, 0.4)), 0 6px 16px rgba(15, 23, 42, 0.18) !important;
    cursor: pointer !important;
    z-index: 9998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.theme-floating-fab:hover {
    transform: scale(1.12) rotate(15deg) !important;
    box-shadow: var(--shadow-glow-theme, 0 12px 30px rgba(0, 87, 166, 0.55)), 0 8px 20px rgba(15, 23, 42, 0.25) !important;
    background: var(--primary-hover, #004080) !important;
    color: #ffffff !important;
}

.theme-floating-fab svg {
    color: #ffffff !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

/* Theme Switcher Popover Modal (Positioned above Floating FAB) */
.theme-switcher-modal {
    position: fixed !important;
    bottom: 85px !important;
    right: 25px !important;
    top: auto !important;
    left: auto !important;
    width: 320px !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 45px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
    z-index: 9999 !important;
    padding: 22px !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.theme-switcher-modal.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

/* Modal Header */
.theme-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.theme-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-modal-close {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    transition: all 0.2s ease;
}

.theme-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

/* Color Preview & Input Section */
.theme-preview-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.theme-color-preview-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(0,0,0,0.1);
    background-color: var(--primary, #0057A6);
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.theme-hex-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px 8px;
}

.theme-hex-input-group span {
    font-weight: 700;
    color: #64748b;
    font-size: 0.85rem;
    padding-right: 4px;
}

.theme-hex-text-input {
    border: none;
    background: transparent;
    width: 100%;
    font-family: monospace;
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    outline: none;
    text-transform: uppercase;
}

.theme-color-native-input {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.theme-color-native-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.theme-color-native-input::-webkit-color-swatch {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

/* RGB Rainbow Hue Slider */
.theme-slider-container {
    margin-bottom: 20px;
}

.theme-slider-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    display: block;
}

.theme-hue-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 10px;
    background: linear-gradient(
        to right,
        #ff0000 0%,
        #ffff00 17%,
        #00ff00 33%,
        #00ffff 50%,
        #0000ff 67%,
        #ff00ff 83%,
        #ff0000 100%
    );
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Slider Thumb Styling */
.theme-hue-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary, #0057A6);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.theme-hue-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.theme-hue-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary, #0057A6);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Preset Swatches Grid */
.theme-swatches-section {
    margin-bottom: 16px;
}

.theme-swatches-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.theme-swatch-btn {
    height: 32px;
    border-radius: 10px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.theme-swatch-btn:hover {
    transform: scale(1.18);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

/* Modal Footer / Reset Button */
.theme-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.theme-reset-btn {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-reset-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
