/* GDPR Cookie Consent Styles */

/* Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid #4F46E5;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-consent-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #4a5568;
    max-width: 600px;
}

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

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.cookie-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.cookie-btn-accept {
    background: #4F46E5;
    color: white;
}

.cookie-btn-accept:hover {
    background: #4338CA;
}

.cookie-btn-reject {
    background: #EF4444;
    color: white;
}

.cookie-btn-reject:hover {
    background: #DC2626;
}

.cookie-btn-settings {
    background: #F3F4F6;
    color: #374151;
    border: 2px solid #D1D5DB;
}

.cookie-btn-settings:hover {
    background: #E5E7EB;
    border-color: #9CA3AF;
}

/* Settings Panel Styles */
.cookie-settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cookie-settings-panel.show {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-panel.show .cookie-settings-content {
    transform: scale(1);
}

.cookie-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.cookie-settings-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.cookie-settings-header {
    padding: 24px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-settings-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.cookie-settings-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6B7280;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s;
}

.cookie-settings-close:hover {
    background: #F3F4F6;
    color: #1a1a1a;
}

.cookie-settings-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cookie-settings-intro {
    margin: 0 0 24px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #4a5568;
}

.cookie-category {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.cookie-category-header h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-category-header p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6B7280;
}

.cookie-category-info {
    margin-top: 12px;
}

.cookie-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-badge-required {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #D1D5DB;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #4F46E5;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(22px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-settings-footer {
    padding: 20px 24px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.cookie-btn-primary {
    background: #4F46E5;
    color: white;
}

.cookie-btn-primary:hover {
    background: #4338CA;
}

.cookie-btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #D1D5DB;
}

.cookie-btn-secondary:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 16px;
    }

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

    .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-settings-content {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-settings-header,
    .cookie-settings-body,
    .cookie-settings-footer {
        padding: 16px;
    }

    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
    }

    .cookie-toggle {
        align-self: flex-start;
    }
}

/* Link to open settings from privacy page */
[data-cookie-settings] {
    color: #4F46E5;
    text-decoration: underline;
    cursor: pointer;
}

[data-cookie-settings]:hover {
    color: #4338CA;
}

/* Accessibility improvements */
.cookie-btn:focus,
.cookie-settings-close:focus,
.cookie-toggle input:focus + .cookie-toggle-slider {
    outline: 2px solid #4F46E5;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .cookie-consent-banner,
    .cookie-settings-panel {
        display: none !important;
    }
}