/**
 * Cookie Consent Custom Styles for EduChecker
 * Matches brand colors and design system
 */

/* Import vanilla-cookieconsent base styles */
@import url('https://cdn.jsdelivr.net/gh/orestbida/cookieconsent@3.0.1/dist/cookieconsent.css');

/* Override with EduChecker brand colors */
:root {
    --cc-bg: #ffffff;
    --cc-text: #2c3e50;
    --cc-btn-primary-bg: #3498db;
    --cc-btn-primary-text: #ffffff;
    --cc-btn-primary-hover-bg: #2980b9;
    --cc-btn-secondary-bg: #ecf0f1;
    --cc-btn-secondary-text: #34495e;
    --cc-btn-secondary-hover-bg: #d5dbdd;
    --cc-toggle-bg-off: #cbd5e0;
    --cc-toggle-bg-on: #3498db;
    --cc-toggle-bg-readonly: #e2e8f0;
    --cc-toggle-knob-bg: #ffffff;
    --cc-cookie-category-block-bg: #f8fafc;
    --cc-cookie-category-block-bg-hover: #f1f5f9;
    --cc-separator-border-color: #e2e8f0;
    --cc-cookie-table-border: #e2e8f0;
    --cc-overlay-bg: rgba(0, 0, 0, 0.6);
    --cc-webkit-scrollbar-bg: #f1f5f9;
    --cc-webkit-scrollbar-bg-hover: #cbd5e0;
}

/* Dark mode support */
[data-theme="dark"], .dark {
    --cc-bg: #1a202c;
    --cc-text: #e2e8f0;
    --cc-btn-primary-bg: #3498db;
    --cc-btn-primary-text: #ffffff;
    --cc-btn-primary-hover-bg: #2980b9;
    --cc-btn-secondary-bg: #2d3748;
    --cc-btn-secondary-text: #cbd5e0;
    --cc-btn-secondary-hover-bg: #4a5568;
    --cc-toggle-bg-off: #4a5568;
    --cc-toggle-bg-on: #3498db;
    --cc-toggle-bg-readonly: #2d3748;
    --cc-toggle-knob-bg: #ffffff;
    --cc-cookie-category-block-bg: #2d3748;
    --cc-cookie-category-block-bg-hover: #4a5568;
    --cc-separator-border-color: #4a5568;
    --cc-cookie-table-border: #4a5568;
    --cc-overlay-bg: rgba(0, 0, 0, 0.85);
    --cc-webkit-scrollbar-bg: #2d3748;
    --cc-webkit-scrollbar-bg-hover: #4a5568;
}

/* Custom styling for consent modal */
#cc-main .cm {
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
}

#cc-main .cm__desc {
    font-size: 14px;
    line-height: 1.6;
}

/* Button styling */
#cc-main .cm__btn,
#cc-main .pm__btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
}

#cc-main .cm__btn:hover,
#cc-main .pm__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Link styling */
#cc-main .cc-link {
    color: var(--cc-btn-primary-bg);
    text-decoration: underline;
    font-weight: 600;
}

#cc-main .cc-link:hover {
    color: var(--cc-btn-primary-hover-bg);
}

/* Settings modal */
#cc-main .pm {
    border-radius: 12px;
    max-width: 700px;
}

#cc-main .pm__section {
    margin-bottom: 20px;
}

#cc-main .pm__section-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
}

#cc-main .pm__section-desc {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Toggle switches */
#cc-main .section__toggle {
    margin-top: 12px;
}

/* Cookie table styling */
#cc-main .pm__table {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
}

#cc-main .pm__table th {
    font-weight: 600;
    font-size: 13px;
    padding: 10px;
}

#cc-main .pm__table td {
    font-size: 13px;
    padding: 10px;
}

/* Footer buttons */
#cc-main .pm__footer {
    padding: 16px 20px;
    gap: 10px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #cc-main .cm {
        max-width: calc(100% - 32px);
        margin: 16px;
    }
    
    #cc-main .pm {
        max-width: calc(100% - 32px);
        margin: 16px;
    }
    
    #cc-main .cm__btn,
    #cc-main .pm__btn {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* Animation improvements */
#cc-main.cc--anim .cm,
#cc-main.cc--anim .pm {
    animation-duration: 0.3s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Accessibility: Focus states */
#cc-main button:focus-visible,
#cc-main a:focus-visible {
    outline: 2px solid var(--cc-btn-primary-bg);
    outline-offset: 2px;
}

/* Custom class for readonly toggles */
#cc-main .toggle--readonly {
    opacity: 0.7;
    cursor: not-allowed;
}
