/**
 * Color Customizer Panel Styles
 */

.color-customizer-panel {
    position: fixed;
    bottom: 0;
    left: 248px;
    z-index: 190;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    pointer-events: none;
}

.customizer-tab {
    background: var(--color-base-1);
    color: var(--color-overlay-1);
    height: 40px;
    padding: 0 18px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    box-shadow: -2px -2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    user-select: none;
    pointer-events: auto;
    position: fixed;
    bottom: 0;
    left: 248px;
    width: auto;
    white-space: nowrap;
}

.customizer-tab:hover {
    filter: brightness(0.85);
    transform: translateY(-3px);
}

.customizer-dismiss {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--color-overlay-1);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

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

.customizer-tab-text {
    font-size: 15px;
    text-transform: none;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.customizer-panel-content {
    position: fixed;
    bottom: 0;
    left: 248px;
    width: 380px;
    background: #ffffff;
    border-radius: 8px 8px 0 0;
    box-shadow: -4px -4px 20px rgba(0, 0, 0, 0.15);
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
    display: flex;
    flex-direction: column;
    z-index: 9999;
}

.color-customizer-panel.open .customizer-panel-content {
    max-height: calc(100vh - 120px);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    overflow-y: auto;
}

.customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--color-base-1);
    border-radius: 8px 8px 0 0;
    user-select: none;
}

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

.toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    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(255, 255, 255, 0.35);
}

.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: var(--color-base-1);
}

.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; }

.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: var(--color-base-1); color: white; }
.btn-export:hover { filter: brightness(0.85); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.accessibility-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid var(--color-base-1);
}

.accessibility-info h4 { margin: 0 0 10px 0; font-size: 14px; color: #333; }
.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: 9999;
    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; }

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