/* Cookie Consent Overlay */
.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.cookie-consent-overlay.active {
    display: block;
}

/* Cookie Consent Modal */
.cookie-consent-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.06);
    z-index: 9999;
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.cookie-consent-modal.active {
    display: block;
}

/* Modal Header */
.cookie-consent-header {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

.cookie-consent-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    letter-spacing: 0 !important;
    word-break: break-word;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-style: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
}

.cookie-consent-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #bbb;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    outline: none;
}

.cookie-consent-close:hover {
    color: #666;
}

.cookie-consent-close:active {
    color: #333;
}

/* Modal Body */
.cookie-consent-body {
    padding: 24px;
    background: #ffffff;
}

.cookie-consent-description {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 24px;
    font-weight: 400;
}

.cookie-consent-description a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cookie-consent-description a:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* Cookie Categories */
.cookie-category {
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.cookie-category-header {
    padding: 16px;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.cookie-category-header:hover {
    background: #f5f5f5;
}

.cookie-category-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.cookie-category-toggle {
    position: relative;
    width: 54px;
    height: 28px;
    background: #d9d9d9;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: 2px solid transparent;
    padding: 0;
    flex-shrink: 0;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cookie-category-toggle:hover:not(:disabled) {
    background: #c2c2c2;
}

.cookie-category-toggle.active {
    background: #0066cc;
}

.cookie-category-toggle.active:hover {
    background: #0052a3;
}

.cookie-category-toggle::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-category-toggle.active::after {
    left: 28px;
}

.cookie-category-toggle:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #d9d9d9 !important;
}

.cookie-category-toggle:disabled::after {
    left: 2px;
}

.cookie-category-content {
    padding: 16px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    font-weight: 400;
}

.cookie-category.expanded .cookie-category-content {
    max-height: 500px;
    background: #ffffff;
}

.cookie-category-badge {
    display: inline-block;
    background: #e8f0fe;
    color: #0052a3;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* Modal Footer */
.cookie-consent-footer {
    padding: 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #fafafa;
}

.cookie-consent-btn {
    padding: 11px 22px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex: 1;
    outline: none;
}

.cookie-consent-btn.reject-all {
    background-color: #f0f0f0;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
}

.cookie-consent-btn.reject-all:hover {
    background-color: #e8e8e8;
    border-color: #d0d0d0;
}

.cookie-consent-btn.save-preferences {
    background-color: #f0f0f0;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
}

.cookie-consent-btn.save-preferences:hover {
    background-color: #e8e8e8;
    border-color: #d0d0d0;
}

.cookie-consent-btn.accept-all {
    background-color: #0066cc;
    color: white;
    border: none;
}

.cookie-consent-btn.accept-all:hover {
    background-color: #0052a3;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

/* Banner (Simple View) */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e8e8e8;
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: none;
}

.cookie-consent-banner.active {
    display: block;
}

.cookie-consent-banner.hidden {
    display: none;
}

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

.banner-message {
    flex: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    font-weight: 400;
}

.banner-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.banner-btn {
    padding: 9px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    outline: none;
}

.banner-btn.settings {
    background-color: #f0f0f0;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
}

.banner-btn.settings:hover {
    background-color: #e8e8e8;
    border-color: #d0d0d0;
}

.banner-btn.accept {
    background-color: #0066cc;
    color: white;
    border: none;
}

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

/* Scrollbar styling */
.cookie-consent-modal::-webkit-scrollbar {
    width: 8px;
}

.cookie-consent-modal::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.cookie-consent-modal::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

.cookie-consent-modal::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-consent-modal {
        max-width: calc(100% - 20px);
        max-height: 90vh;
    }

    .cookie-consent-header h2 {
        font-size: 20px !important;
    }

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

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

    .banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .banner-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-consent-header {
        padding: 16px;
    }

    .cookie-consent-header h2 {
        font-size: 18px;
    }

    .cookie-consent-body {
        padding: 16px;
    }

    .cookie-consent-footer {
        padding: 16px;
    }

    .banner-message {
        font-size: 13px;
    }
}
