/* 🔥🔥🔥 Legal Pages Theme Picker Styles */

/* Floating trigger button (bottom-right corner) */
.legal-theme-picker-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5c6bc0, #7986cb);
    border: 3px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legal-theme-picker-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

/* Modal overlay - NO BACKGROUND, just container */
.legal-theme-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    pointer-events: none; /* Let clicks through except on modal content */
}

/* Modal content - Draggable */
.legal-theme-modal-content {
    background: rgba(26, 31, 58, 0.95);
    border: 2px solid rgba(92, 107, 192, 0.6);
    border-radius: 16px;
    width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.9);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: all; /* Re-enable pointer events on modal */
    backdrop-filter: blur(10px);
}

/* Header - Draggable handle */
.legal-theme-header {
    padding: 25px 30px;
    border-bottom: 1px solid rgba(92, 107, 192, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move;
    user-select: none;
}

.legal-theme-header:active {
    cursor: grabbing;
}

.legal-theme-header h2 {
    color: #84D0F0;
    font-size: 24px;
    margin: 0;
    font-weight: 600;
}

.legal-theme-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    width: 40px;
    height: 40px;
}

.legal-theme-close img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

.legal-theme-close .icon-active {
    opacity: 0;
}

.legal-theme-close:hover .icon-default {
    opacity: 0;
}

.legal-theme-close:hover .icon-active {
    opacity: 1;
}

/* Body */
.legal-theme-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Color grid */
.legal-theme-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.legal-theme-color-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legal-theme-color-item label {
    color: #e8eaf6;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legal-theme-color-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.legal-theme-color-input {
    width: 60px;
    height: 40px;
    border: 2px solid rgba(92, 107, 192, 0.3);
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

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

.legal-theme-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.legal-theme-color-text {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(92, 107, 192, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    color: #e8eaf6;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}

.legal-theme-color-text:focus {
    outline: none;
    border-color: #84D0F0;
    background: rgba(0, 0, 0, 0.5);
}

/* Footer */
.legal-theme-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(92, 107, 192, 0.3);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.legal-theme-btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.legal-theme-btn-primary {
    background: #5c6bc0;
    color: #fff;
}

.legal-theme-btn-primary:hover {
    background: #7986cb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 107, 192, 0.4);
}

.legal-theme-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e8eaf6;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-theme-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.legal-theme-btn-success {
    background: #4caf50;
    color: #fff;
}

.legal-theme-btn-success:hover {
    background: #66bb6a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .legal-theme-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .legal-theme-header {
        padding: 20px;
    }

    .legal-theme-header h2 {
        font-size: 20px;
    }

    .legal-theme-body {
        padding: 20px;
    }

    .legal-theme-color-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .legal-theme-footer {
        flex-direction: column;
        gap: 10px;
    }

    .legal-theme-btn {
        width: 100%;
    }
}
