﻿/* cookie-consent.css */

/* Base Styles */
:root {
    --cookie-primary-color: #2565b3;
    --cookie-secondary-color: #6c757d;
    --cookie-text-color: #212529;
    --cookie-background: #ffffff;
    --cookie-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    --cookie-border-radius: 8px;
    --cookie-z-index: 9999;
}

/* Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    background-color: var(--cookie-background);
    box-shadow: var(--cookie-shadow);
    border-radius: var(--cookie-border-radius);
    z-index: var(--cookie-z-index);
    animation: slideUp 0.5s ease;
}

.cookie-consent-content {
    padding: 20px 25px;
}

.cookie-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

    .cookie-title h3 {
        margin: 0;
        font-size: 1.3rem;
        color: var(--cookie-primary-color);
        font-weight: 600;
    }

.cookie-body {
    margin-bottom: 20px;
}

    .cookie-body p {
        margin: 0 0 15px;
        font-size: 0.95rem;
        line-height: 1.6;
        color: var(--cookie-text-color);
    }

    .cookie-body a {
        color: var(--cookie-primary-color);
        text-decoration: underline;
    }

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

    .cookie-buttons .btn {
        min-width: 120px;
        padding: 10px 16px;
        border-radius: 4px;
        font-size: 0.95rem;
        font-weight: 500;
        cursor: pointer;
        border: 1px solid transparent;
        transition: all 0.2s ease;
        text-align: center;
    }

    .cookie-buttons .btn-primary {
        background-color: #2565b3;
        color: white;
        border-color: #2565b3;
    }

        .cookie-buttons .btn-primary:hover {
            background-color: #1d4d8a;
            border-color: #1d4d8a;
        }

    .cookie-buttons .btn-secondary {
        background-color: #6c757d;
        color: white;
        border-color: #6c757d;
    }

        .cookie-buttons .btn-secondary:hover {
            background-color: #5a6268;
            border-color: #5a6268;
        }

    .cookie-buttons .btn-outline {
        background-color: transparent;
        border-color: #dee2e6;
        color: #212529;
    }

        .cookie-buttons .btn-outline:hover {
            background-color: #f8f9fa;
        }

/* Preference Center Styles */
.cookie-preference-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: var(--cookie-background);
    box-shadow: var(--cookie-shadow);
    border-radius: var(--cookie-border-radius);
    z-index: var(--cookie-z-index);
    animation: fadeIn 0.3s ease;
}

.cookie-preference-content {
    padding: 25px;
}

.cookie-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    padding: 0;
    color: var(--cookie-secondary-color);
    cursor: pointer;
}

    .cookie-close:hover {
        color: var(--cookie-text-color);
    }

.cookie-categories {
    margin-top: 20px;
}

.cookie-category {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cookie-text-color);
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    margin-right: 15px;
}

    .cookie-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

    .cookie-slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
    }

input:checked + .cookie-slider {
    background-color: var(--cookie-primary-color);
}

input:disabled + .cookie-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

input:checked + .cookie-slider:before {
    transform: translateX(24px);
}

/* Rounded sliders */
.cookie-slider.round {
    border-radius: 34px;
}

    .cookie-slider.round:before {
        border-radius: 50%;
    }

/* Cookie preferences button in footer */
.cookie-preferences-btn {
    text-decoration: underline;
    color: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    color: #2565b3;
    font-weight: normal;
    text-decoration: none;
}

    .cookie-preferences-btn:hover {
        text-decoration: underline;
    }

/* Footer integration */
.footer-links .cookie-preferences-btn {
    display: inline;
    text-align: left;
    font-size: inherit;
    color: inherit;
    padding: 0;
    margin: 0;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translate(-50%, 150px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .cookie-buttons {
        justify-content: center;
    }

        .cookie-buttons .btn {
            flex: 1 1 auto;
            text-align: center;
        }

    .cookie-category-header {
        flex-direction: row;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner,
    .cookie-preference-center {
        width: 95%;
    }

    .cookie-consent-content,
    .cookie-preference-content {
        padding: 15px;
    }

    .cookie-buttons .btn {
        min-width: auto;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}
