/**
 * Color Theme Customizer Panel Styles
 */

.color-customizer-panel {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: row-reverse;
    z-index: 190;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    pointer-events: none;
}

.customizer-tab {
    background: #7209b7;
    color: #ffffff;
    padding: 20px 12px;
    padding-top: 32px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    user-select: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    pointer-events: auto;
    position: relative;
}

.customizer-tab:hover {
    background: #5e07a0;
    padding-left: 16px;
}

.customizer-dismiss {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    writing-mode: horizontal-tb;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
    z-index: 1;
}

.customizer-dismiss:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateX(-50%) scale(1.15);
}

.customizer-tab-text {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.customizer-panel-content {
    width: 380px;
    background: #ffffff;
    border-radius: 12px 0 0 12px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 600px;
}

.color-customizer-panel.open .customizer-panel-content {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #4cc9f0;
    border-radius: 12px 0 0 0;
    user-select: none;
}

.customizer-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
}

.toggle-btn {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: #000000;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.color-customizer-panel.minimized .toggle-btn i {
    transform: rotate(180deg);
}

.customizer-content {
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.customizer-content::-webkit-scrollbar {
    width: 8px;
}

.customizer-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.customizer-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.customizer-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.color-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.color-group:last-of-type {
    border-bottom: none;
}

.color-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.label-text {
    flex: 1;
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    display: inline-block;
}

.color-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.color-input-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.color-input-group input[type="text"] {
    flex: 1;
    height: 40px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s ease;
}

.color-input-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.contrast-info {
    margin-top: 10px;
    font-size: 12px;
}

.contrast-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.contrast-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid transparent;
}

.contrast-item.pass {
    border-left-color: #28a745;
    background: #f0f9f4;
}

.contrast-item.fail {
    border-left-color: #dc3545;
    background: #fef5f5;
}

.contrast-label {
    flex: 1;
    font-weight: 500;
    color: #555;
}

.contrast-ratio {
    font-weight: 700;
    color: #333;
    font-family: 'Courier New', monospace;
}

.contrast-badge {
    margin-left: 5px;
}

.badge-aaa,
.badge-aa,
.badge-fail {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-aaa {
    background: #28a745;
    color: white;
}

.badge-aa {
    background: #ffc107;
    color: #333;
}

.badge-fail {
    background: #dc3545;
    color: white;
}

.contrast-recommendation {
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contrast-recommendation.good {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.contrast-recommendation.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.contrast-recommendation i {
    font-size: 16px;
}

.customizer-actions {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.btn-reset,
.btn-export {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset {
    background: #6c757d;
    color: white;
}

.btn-reset:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-export {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.accessibility-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #667eea;
}

.accessibility-info h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.accessibility-info p {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.accessibility-info strong {
    color: #333;
}

.customizer-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 195;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.customizer-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.customizer-notification.success {
    border-left: 4px solid #28a745;
}

.customizer-notification.error {
    border-left: 4px solid #dc3545;
}

.customizer-notification i {
    font-size: 20px;
}

.customizer-notification.success i {
    color: #28a745;
}

.customizer-notification.error i {
    color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .color-customizer-panel {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .color-customizer-panel {
        background: #2d2d2d;
    }
    
    .customizer-header h3 {
        color: #ffffff;
    }
    
    .customizer-content {
        background: #2d2d2d;
    }
    
    .color-group label {
        color: #e0e0e0;
    }
    
    .color-input-group input[type="text"] {
        background: #3d3d3d;
        border-color: #4d4d4d;
        color: #e0e0e0;
    }
    
    .contrast-item {
        background: #3d3d3d;
    }
    
    .contrast-item.pass {
        background: #1a3d2a;
    }
    
    .contrast-item.fail {
        background: #3d1a1a;
    }
    
    .accessibility-info {
        background: #3d3d3d;
        color: #e0e0e0;
    }
    
    .accessibility-info h4,
    .accessibility-info strong {
        color: #e0e0e0;
    }
    
    .accessibility-info p {
        color: #b0b0b0;
    }
}
