/**
 * Cookie Consent Banner Styles
 * GDPR-compliant, accessible, and matches JimFrames brand
 */

#cookie-consent-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-consent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.cookie-consent-container {
    position: relative;
    z-index: 10000;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 16px;
    border: 2px solid #374151;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-content {
    padding: 32px;
}

.cookie-consent-title {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cookie-consent-description {
    font-size: 16px;
    line-height: 1.6;
    color: #d1d5db;
    margin-bottom: 24px;
}

.cookie-consent-options {
    margin-bottom: 24px;
    background: rgba(31, 41, 55, 0.5);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #374151;
}

.cookie-option {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #374151;
}

.cookie-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cookie-option-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.cookie-option-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #f59e0b;
}

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

.cookie-option-header label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
}

.cookie-option-header input[type="checkbox"]:disabled + label {
    cursor: not-allowed;
}

.required-badge {
    display: inline-block;
    background: #f59e0b;
    color: #1f2937;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-option-description {
    font-size: 14px;
    line-height: 1.5;
    color: #9ca3af;
    margin-left: 32px;
    margin-bottom: 0;
}

.cookie-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.cookie-consent-buttons button {
    flex: 1;
    min-width: 140px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1f2937;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

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

.btn-secondary {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 2px solid #f59e0b;
}

.btn-secondary:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #fbbf24;
    transform: translateY(-2px);
}

.btn-text {
    background: transparent;
    color: #9ca3af;
    border: 2px solid transparent;
}

.btn-text:hover {
    color: #d1d5db;
    border-color: #4b5563;
    background: rgba(75, 85, 99, 0.2);
}

.cookie-consent-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid #374151;
}

.cookie-link {
    font-size: 14px;
    color: #fbbf24;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cookie-link:hover {
    color: #f59e0b;
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .cookie-consent-content {
        padding: 24px;
    }

    .cookie-consent-title {
        font-size: 24px;
    }

    .cookie-consent-description {
        font-size: 14px;
    }

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

    .cookie-consent-buttons button {
        width: 100%;
        min-width: unset;
    }

    .cookie-consent-links {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Accessibility: Focus styles */
.cookie-consent-buttons button:focus,
.cookie-option-header input[type="checkbox"]:focus,
.cookie-link:focus {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-container {
        border: 3px solid #fbbf24;
    }

    .btn-text {
        border-color: #9ca3af;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #cookie-consent-banner,
    .cookie-consent-container {
        animation: none;
    }

    .cookie-consent-buttons button:hover {
        transform: none;
    }
}

/* Cookie settings button (for footer/settings page) */
.cookie-settings-trigger {
    display: inline-block;
    background: transparent;
    color: #fbbf24;
    border: none;
    padding: 0;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-settings-trigger:hover {
    color: #f59e0b;
}
