/* ═══════════════════════════════════════════════════════════════════
   GDPR Cookie Consent Styles
   Banner, placeholders, and manage button
   ═══════════════════════════════════════════════════════════════════ */

/* ── Consent Overlay & Banner ───────────────────────────────────── */

#consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.consent-banner {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px 24px 0 0;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.consent-closing .consent-banner {
    animation: slideDown 0.3s ease-in forwards;
}

@keyframes slideDown {
    to {
        opacity: 0;
        transform: translateY(100px);
    }
}

/* ── Banner Header ──────────────────────────────────────────────── */

.consent-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.consent-icon {
    color: #007ca1;
    flex-shrink: 0;
}

.consent-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a2a35;
    margin: 0;
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
}

/* ── Banner Body ────────────────────────────────────────────────── */

.consent-body {
    font-size: 14px;
    line-height: 1.6;
    color: #3a4a55;
    margin-bottom: 20px;
}

/* ── Consent Options (Checkboxes) ───────────────────────────────── */

.consent-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.consent-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: background 0.2s ease;
    user-select: none;
}

.consent-option:hover {
    background: rgba(0, 124, 161, 0.05);
}

.consent-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.consent-checkmark {
    position: relative;
    width: 22px;
    height: 22px;
    border: 2px solid #b0c4ce;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.consent-option input[type="checkbox"]:checked~.consent-checkmark {
    background: #007ca1;
    border-color: #007ca1;
}

.consent-option input[type="checkbox"]:checked~.consent-checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.consent-option span:last-child {
    font-size: 14px;
    font-weight: 500;
    color: #1a2a35;
}

/* Disabled state (for Necessary category) */
.consent-option input[type="checkbox"]:disabled~.consent-checkmark {
    background-color: #e5e7eb !important;
    border-color: #d1d5db !important;
    cursor: not-allowed;
    opacity: 0.6 !important;
}

.consent-option input[type="checkbox"]:checked:disabled~.consent-checkmark {
    background-color: #9ca3af !important;
    border-color: #9ca3af !important;
}

.consent-option input[type="checkbox"]:disabled~span {
    color: #64748b;
    cursor: not-allowed;
}

/* ── Action Buttons ─────────────────────────────────────────────── */

.consent-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.consent-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.consent-btn-accept {
    background: linear-gradient(135deg, #00b900, #008f00);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 185, 0, 0.3);
}

.consent-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 185, 0, 0.4);
}

.consent-btn-selected {
    background: linear-gradient(135deg, #007ca1, #005f7f);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 124, 161, 0.3);
}

.consent-btn-selected:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 161, 0.4);
}

.consent-btn-reject {
    background: #e0e5ea;
    color: #3a4a55;
}

.consent-btn-reject:hover {
    background: #d0d8de;
    transform: translateY(-2px);
}

.consent-btn:active {
    transform: translateY(0);
}

/* ── Privacy Link ───────────────────────────────────────────────── */

.consent-privacy-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 13px;
    color: #007ca1;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.consent-privacy-link:hover {
    border-bottom-color: #007ca1;
}

/* ── Manage Consent Button (Persistent) ─────────────────────────── */

.manage-consent-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 124, 161, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #007ca1;
}

.manage-consent-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 30px rgba(0, 124, 161, 0.3);
    background: rgba(0, 124, 161, 0.1);
}

.manage-consent-btn svg {
    width: 20px;
    height: 20px;
}

/* ── Consent Placeholders (for Maps, Videos) ────────────────────── */

.consent-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 450px;
    background: linear-gradient(135deg, rgba(0, 124, 161, 0.05), rgba(0, 180, 216, 0.08));
    border: 2px dashed rgba(0, 124, 161, 0.3);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.consent-placeholder:hover {
    border-color: rgba(0, 124, 161, 0.5);
    background: linear-gradient(135deg, rgba(0, 124, 161, 0.08), rgba(0, 180, 216, 0.12));
}

.consent-placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.consent-placeholder-text {
    font-size: 15px;
    line-height: 1.6;
    color: #3a4a55;
    max-width: 400px;
    margin-bottom: 20px;
}

.consent-placeholder-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #007ca1, #005f7f);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 124, 161, 0.3);
    font-family: inherit;
}

.consent-placeholder-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 161, 0.4);
}

.consent-placeholder-btn:active {
    transform: translateY(0);
}

/* Gallery-specific placeholder */
.consent-placeholder-gallery {
    min-height: 100%;
    border-radius: 8px;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media screen and (max-width: 768px) {
    #consent-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .consent-banner {
        border-radius: 24px 24px 0 0;
        padding: 24px 20px;
        max-width: 100%;
    }

    .consent-header h3 {
        font-size: 1.2rem;
    }

    .consent-body {
        font-size: 13px;
    }

    .consent-actions {
        flex-direction: column;
    }

    .consent-btn {
        width: 100%;
        min-width: auto;
    }

    .manage-consent-btn {
        bottom: 16px;
        left: 16px;
        width: 46px;
        height: 46px;
    }

    .consent-placeholder {
        min-height: 300px;
        padding: 30px 16px;
    }

    .consent-placeholder-icon {
        font-size: 48px;
    }

    .consent-placeholder-text {
        font-size: 14px;
    }
}