/**
 * GDPR Cookie Consent - Banner & Modal Styles
 * Version 2.0.0 - Two-level design
 */

/* ========== COMPACT BANNER ========== */

.gdpr-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    z-index: 999999;
    padding: 16px 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    max-width: calc(100% - 32px);
    animation: gdpr-slide-up 0.4s ease forwards;
}

@keyframes gdpr-slide-up {
    to { transform: translateX(-50%) translateY(0); }
}

.gdpr-banner.gdpr-hidden {
    animation: gdpr-slide-down 0.3s ease forwards;
}

@keyframes gdpr-slide-down {
    to { transform: translateX(-50%) translateY(150%); }
}

.gdpr-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gdpr-banner-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gdpr-banner-text {
    font-size: 14px;
}

.gdpr-banner-text a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.85;
    margin-left: 4px;
}

.gdpr-banner-text a:hover {
    opacity: 1;
}

/* ========== BUTTONS ========== */

.gdpr-banner-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.gdpr-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.gdpr-btn-accept {
    background: #22c55e;
    color: #ffffff;
}

.gdpr-btn-accept:hover {
    filter: brightness(1.1);
}

.gdpr-btn-settings {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
}

.gdpr-btn-settings:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

.gdpr-btn-reject {
    background: transparent;
    border: none;
    text-decoration: underline;
    padding: 10px 12px;
    opacity: 0.7;
}

.gdpr-btn-reject:hover {
    opacity: 1;
}

/* ========== MODAL OVERLAY ========== */

.gdpr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gdpr-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========== MODAL ========== */

.gdpr-modal {
    background: #1f2937;
    color: #ffffff;
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.gdpr-modal-overlay.active .gdpr-modal {
    transform: scale(1) translateY(0);
}

.gdpr-modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gdpr-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gdpr-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    opacity: 0.6;
}

.gdpr-modal-close:hover {
    opacity: 1;
}

.gdpr-modal-body {
    padding: 24px;
}

.gdpr-modal-intro {
    font-size: 14px;
    opacity: 0.8;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* ========== CATEGORY ITEMS ========== */

.gdpr-category-item {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

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

.gdpr-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.gdpr-category-title {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gdpr-category-badge {
    font-size: 10px;
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.gdpr-category-badge.required {
    background: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.gdpr-category-desc {
    font-size: 13px;
    opacity: 0.7;
    line-height: 1.5;
    margin: 0;
}

/* ========== TOGGLE SWITCH ========== */

.gdpr-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

.gdpr-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.2);
    transition: 0.3s;
    border-radius: 26px;
}

.gdpr-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

.gdpr-toggle input:checked + .gdpr-toggle-slider {
    background: #22c55e;
}

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

.gdpr-toggle input:disabled + .gdpr-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== MODAL FOOTER ========== */

.gdpr-modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 10px;
}

.gdpr-modal-footer .gdpr-btn {
    flex: 1;
    text-align: center;
}

/* ========== MOBILE RESPONSIVE ========== */

@media (max-width: 700px) {
    .gdpr-banner {
        bottom: 16px;
        padding: 16px;
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(150%);
        max-width: none;
    }
    
    .gdpr-banner-content {
        flex-direction: column;
        gap: 16px;
    }

    .gdpr-banner-main {
        text-align: center;
        flex-direction: column;
        gap: 8px;
    }

    .gdpr-banner-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .gdpr-btn {
        flex: 1;
        min-width: 100px;
        padding: 12px 18px;
    }
    
    .gdpr-btn-reject {
        flex: 0;
        order: 3;
        width: 100%;
    }
    
    .gdpr-modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    .gdpr-modal-footer {
        flex-direction: column;
    }
    
    .gdpr-modal-footer .gdpr-btn {
        width: 100%;
    }
}

@media (max-width: 700px) {
    @keyframes gdpr-slide-up {
        to { transform: translateX(0) translateY(0); }
    }

    @keyframes gdpr-slide-down {
        to { transform: translateX(0) translateY(150%); }
    }
}

/* ========== ACCESSIBILITY ========== */

.gdpr-btn:focus,
.gdpr-toggle input:focus + .gdpr-toggle-slider,
.gdpr-modal-close:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* ========== PRINT ========== */

@media print {
    .gdpr-banner,
    .gdpr-modal-overlay { 
        display: none !important; 
    }
}
