/* ====================================
   Cookie Consent Banner Styles - Modern Edition 2027
   GDPR/EDPB Compliant Cookie Banner
   ==================================== */

.cookie-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98), rgba(40, 40, 40, 0.98));
    backdrop-filter: blur(10px);
    padding: clamp(1.5rem, 5vw, 2.5rem);
    max-height: 90vh;
    max-width: 600px;
    width: 90%;
    overflow-y: auto;
    animation: popInModal 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px 0 rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-banner.hidden {
    display: none !important;
}

.cookie-banner.hidden ~ .cookie-backdrop {
    display: none !important;
}

@keyframes popInModal {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.cookie-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    animation: fadeIn 300ms ease-out;
    cursor: pointer;
}

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

.cookie-content {
    max-width: 900px;
    margin: 0 auto;
    color: #ffffff;
}

.cookie-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.cookie-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.cookie-icon {
    color: #52b788;
    flex-shrink: 0;
    animation: rotate 3s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-icon svg {
    width: 32px;
    height: 32px;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cookie-header h2 {
    color: #ffffff;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.cookie-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    transition: all 150ms ease-out;
    flex-shrink: 0;
    border-radius: 0.5rem;
    width: 44px;
    height: 44px;
}

.cookie-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffcc00;
    transform: rotate(90deg);
}

.cookie-close:focus-visible {
    outline: 2px solid #52b788;
    outline-offset: 2px;
}

.cookie-description {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.cookie-details {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 150ms ease-out;
}

.cookie-details:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.cookie-details summary {
    color: #ffcc00;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
    transition: color 150ms ease-out;
    outline: none;
    position: relative;
    padding-left: 1.5rem;
}

.cookie-details summary:hover {
    color: #fff;
}

.cookie-details summary::marker {
    color: #52b788;
}

.cookie-details[open] summary {
    margin-bottom: 1rem;
    color: #fff;
}

.cookie-details-content {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    padding-left: 1.5rem;
}

.cookie-details-content p {
    margin-bottom: 0.75rem;
}

.cookie-details-content p:last-child {
    margin-bottom: 0;
}

.cookie-categories {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cookie-category {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-category input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #52b788;
    flex-shrink: 0;
    transition: all 150ms ease-out;
}

.cookie-category input[type="checkbox"]:hover {
    transform: scale(1.1);
}

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

.cookie-category input[type="checkbox"]:checked {
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

.cookie-category input[type="checkbox"]:focus-visible {
    outline: 2px solid #52b788;
    outline-offset: 2px;
}

.cookie-category label {
    cursor: pointer;
    flex: 1;
    margin-bottom: 0;
    user-select: none;
}

.cookie-category strong {
    color: #ffffff;
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.description-small {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.required-badge {
    display: inline-block;
    background: linear-gradient(135deg, #2d7a3e, #52b788);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 0.3rem;
    text-transform: uppercase;
    margin-left: 0.5rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(45, 122, 62, 0.2);
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cookie-actions .btn {
    flex: 1;
    min-width: clamp(120px, 25vw, 200px);
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.6rem;
    transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    border: none;
}

.cookie-actions .btn:active {
    transform: scale(0.98);
}

.cookie-actions .btn:focus-visible {
    outline: 2px solid #ffcc00;
    outline-offset: 2px;
}

.btn.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn.btn-primary {
    background: linear-gradient(135deg, #2d7a3e, #52b788);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(45, 122, 62, 0.3);
}

.btn.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(45, 122, 62, 0.4);
    transform: translateY(-2px);
}

.btn.btn-primary:active {
    box-shadow: 0 2px 10px rgba(21, 101, 192, 0.2);
}

.cookie-footer {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 0;
    line-height: 1.5;
}

.cookie-footer a {
    color: #ffcc00;
    text-decoration: none;
    font-weight: 600;
    transition: all 150ms ease-out;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.cookie-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.cookie-footer a:focus-visible {
    outline: 2px solid #ffcc00;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 1.25rem;
        border-radius: 1rem 1rem 0 0;
    }

    .cookie-content {
        max-width: 100%;
    }

    .cookie-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cookie-title-section {
        width: 100%;
    }

    .cookie-header h2 {
        font-size: 1.25rem;
    }

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

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

    .cookie-actions .btn {
        width: 100%;
        min-width: unset;
    }

    .cookie-description {
        font-size: 0.95rem;
    }

    .cookie-categories {
        gap: 1rem;
    }

    .cookie-category {
        gap: 0.75rem;
    }

    .cookie-footer {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem;
        max-height: 90vh;
    }

    .cookie-header h2 {
        font-size: 1.1rem;
    }

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

    .cookie-close {
        width: 38px;
        height: 38px;
    }

    .cookie-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .cookie-categories {
        padding: 0.75rem;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .cookie-category {
        gap: 0.75rem;
    }

    .cookie-actions {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .cookie-actions .btn {
        font-size: 0.9rem;
        padding: 0.65rem 1.25rem;
    }

    .cookie-footer {
        font-size: 0.75rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cookie-banner {
        background: linear-gradient(135deg, rgba(15, 15, 15, 0.98), rgba(30, 30, 30, 0.98));
    }

    .cookie-backdrop {
        background: rgba(0, 0, 0, 0.5);
    }
}

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

    .cookie-close {
        transition: color 150ms ease-out;
    }

    .cookie-close:hover {
        transform: none;
    }

    .cookie-icon {
        animation: none;
    }

    .cookie-actions .btn {
        transition: color 150ms ease-out;
    }

    .cookie-actions .btn:hover {
        transform: none;
    }
}

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