/**
 * Cookie Consent SDK Styles
 * 
 * Accessible, responsive styles with WCAG 2.1 AA compliance
 * Color contrast ratio: 4.5:1 minimum
 */

/* Banner Overlay */
.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

/* Banner Container */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    outline: none;
}

/* Banner Content */
.cookie-consent-content {
    background-color: #ffffff;
    color: #1a1a1a;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px 8px 0 0;
}

/* Title */
.cookie-consent-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #1a1a1a;
}

/* Description */
.cookie-consent-description {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    color: #333333;
}

/* Categories Container */
.cookie-consent-categories {
    margin: 1.5rem 0;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
}

/* Individual Category */
.cookie-consent-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* Category Label */
.cookie-consent-category-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #1a1a1a;
}

.cookie-consent-category-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
}

.cookie-consent-category-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Focus styles for accessibility */
.cookie-consent-category-label input[type="checkbox"]:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Category Title */
.cookie-consent-category-title {
    font-size: 1rem;
    color: #1a1a1a;
}

/* Required Badge */
.cookie-consent-required {
    font-size: 0.875rem;
    color: #666666;
    font-weight: normal;
    margin-left: 0.5rem;
}

/* Category Description */
.cookie-consent-category-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #555555;
    margin: 0.5rem 0 0 2.25rem;
}

/* Actions Container */
.cookie-consent-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Buttons */
.cookie-consent-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    flex: 1;
    min-width: 120px;
}

.cookie-consent-btn:hover {
    transform: translateY(-1px);
}

.cookie-consent-btn:active {
    transform: translateY(0);
}

.cookie-consent-btn:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Accept Button */
.cookie-consent-btn-accept {
    background-color: #0066cc;
    color: #ffffff;
}

.cookie-consent-btn-accept:hover {
    background-color: #0052a3;
}

/* Reject Button */
.cookie-consent-btn-reject {
    background-color: #6c757d;
    color: #ffffff;
}

.cookie-consent-btn-reject:hover {
    background-color: #5a6268;
}

/* Floating Trigger Button */
.cookie-consent-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #0066cc;
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9997;
    transition: background-color 0.2s, transform 0.2s;
}

.cookie-consent-trigger:hover {
    background-color: #0052a3;
    transform: scale(1.05);
}

.cookie-consent-trigger:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.cookie-consent-trigger svg {
    width: 24px;
    height: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 1.5rem;
        border-radius: 0;
    }

    .cookie-consent-title {
        font-size: 1.25rem;
    }

    .cookie-consent-description {
        font-size: 0.9375rem;
    }

    .cookie-consent-actions {
        flex-direction: column;
    }

    .cookie-consent-btn {
        width: 100%;
    }

    .cookie-consent-trigger {
        bottom: 15px;
        right: 15px;
        width: 48px;
        height: 48px;
    }

    .cookie-consent-trigger svg {
        width: 20px;
        height: 20px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cookie-consent-content {
        border: 2px solid #000000;
    }

    .cookie-consent-category {
        border: 2px solid #000000;
    }

    .cookie-consent-btn {
        border: 2px solid #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-btn,
    .cookie-consent-trigger {
        transition: none;
    }

    .cookie-consent-btn:hover,
    .cookie-consent-trigger:hover {
        transform: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .cookie-consent-content {
        background-color: #1a1a1a;
        color: #ffffff;
    }

    .cookie-consent-title {
        color: #ffffff;
    }

    .cookie-consent-description {
        color: #e0e0e0;
    }

    .cookie-consent-category {
        background-color: #2a2a2a;
        border-color: #404040;
    }

    .cookie-consent-category-title {
        color: #ffffff;
    }

    .cookie-consent-category-description {
        color: #cccccc;
    }

    .cookie-consent-required {
        color: #999999;
    }
}
