/* Cookie consent banner + modal */
@keyframes cookieBannerEnter {
    0% {
        opacity: 0;
        transform: translateY(48px) scale(0.92);
    }
    55% {
        opacity: 1;
        transform: translateY(-6px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cookieBannerExit {
    to {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
}

@keyframes cookieBounce {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-7px) rotate(4deg); }
}

@keyframes cookieGlowPulse {
    0%, 100% { opacity: 0.45; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.08); }
}

@keyframes cookieShimmer {
    0% { transform: translateX(-120%) skewX(-12deg); }
    100% { transform: translateX(220%) skewX(-12deg); }
}

@keyframes cookieCrumbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    50% { transform: translate(var(--dx, 4px), var(--dy, -8px)) scale(1.15); opacity: 1; }
}

@keyframes cookieSparkle {
    0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes cookieTitlePop {
    0% { opacity: 0; transform: translateX(-12px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes cookieTextFade {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes cookieBtnRise {
    0% { opacity: 0; transform: translateY(14px) scale(0.94); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cookieBtnGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 87, 0.45); }
    50% { box-shadow: 0 0 0 8px rgba(255, 200, 87, 0); }
}

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 99990;
    max-width: 920px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(48px) scale(0.92);
    pointer-events: none;
}

.cookie-banner.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: cookieBannerEnter 0.75s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
}

.cookie-banner.is-hiding {
    animation: cookieBannerExit 0.35s ease forwards;
    pointer-events: none;
}

.cookie-banner-inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px 18px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #2d3561 0%, #4a2d6e 55%, #5c3d7a 100%);
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.cookie-banner-glow {
    position: absolute;
    top: -40%;
    left: -20%;
    width: 55%;
    height: 140%;
    background: radial-gradient(circle, rgba(255, 214, 128, 0.35) 0%, transparent 70%);
    pointer-events: none;
    animation: cookieGlowPulse 3s ease-in-out infinite;
}

.cookie-banner-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 38%,
        rgba(255, 255, 255, 0.07) 50%,
        transparent 62%
    );
    transform: translateX(-120%) skewX(-12deg);
    pointer-events: none;
}

.cookie-banner.is-visible .cookie-banner-inner::after {
    animation: cookieShimmer 2.8s ease-in-out 0.4s 1;
}

.cookie-banner-icon-wrap {
    position: relative;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-banner-icon {
    position: relative;
    z-index: 2;
    font-size: 32px;
    line-height: 1;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
    animation: cookieBounce 2.2s ease-in-out infinite;
}

.cookie-crumb {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c68642;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    z-index: 1;
    animation: cookieCrumbFloat 2.4s ease-in-out infinite;
}

.cookie-crumb--1 { top: 2px; left: 4px; --dx: -5px; --dy: -6px; animation-delay: 0s; }
.cookie-crumb--2 { top: 8px; right: 0; --dx: 6px; --dy: -4px; animation-delay: 0.4s; background: #8b5a2b; }
.cookie-crumb--3 { bottom: 6px; left: 0; --dx: -4px; --dy: 5px; animation-delay: 0.8s; }
.cookie-crumb--4 { bottom: 2px; right: 6px; --dx: 5px; --dy: 6px; animation-delay: 1.2s; background: #a0622e; }

.cookie-sparkle {
    position: absolute;
    font-size: 10px;
    color: #ffd680;
    z-index: 3;
    pointer-events: none;
    animation: cookieSparkle 2s ease-in-out infinite;
}

.cookie-sparkle--1 { top: -2px; right: 2px; animation-delay: 0.3s; }
.cookie-sparkle--2 { bottom: 0; left: 2px; animation-delay: 1.1s; font-size: 8px; }

.cookie-banner-text {
    position: relative;
    z-index: 1;
    flex: 1 1 260px;
    min-width: 0;
}

.cookie-banner-text h2 {
    margin: 0 0 6px;
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 17px;
    font-weight: 700;
    opacity: 0;
}

.cookie-banner.is-visible .cookie-banner-text h2 {
    animation: cookieTitlePop 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) 0.2s forwards;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
}

.cookie-banner.is-visible .cookie-banner-text p {
    animation: cookieTextFade 0.55s ease 0.35s forwards;
}

.cookie-banner-text a {
    color: #ffd680;
    font-weight: 700;
    text-decoration: underline;
}

.cookie-banner-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.cookie-banner.is-visible .cookie-banner-actions .cookie-btn:nth-child(1) {
    animation: cookieBtnRise 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.45s forwards,
               cookieBtnGlow 2.5s ease-in-out 1.2s infinite;
    opacity: 0;
}

.cookie-banner.is-visible .cookie-banner-actions .cookie-btn:nth-child(2) {
    animation: cookieBtnRise 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.55s forwards;
    opacity: 0;
}

.cookie-banner.is-visible .cookie-banner-actions .cookie-btn:nth-child(3) {
    animation: cookieBtnRise 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.65s forwards;
    opacity: 0;
}

@media (min-width: 768px) {
    .cookie-banner-actions {
        width: auto;
        margin-left: auto;
        flex-shrink: 0;
    }
}

.cookie-btn {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
}

.cookie-btn:hover {
    transform: translateY(-2px) scale(1.03);
}

.cookie-btn--primary {
    background: linear-gradient(135deg, #ffc857, #ff8c42);
    color: #2d3561;
}

.cookie-btn-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 100%
    );
    transform: translateX(-120%);
    pointer-events: none;
}

.cookie-banner.is-visible .cookie-btn--primary .cookie-btn-shine {
    animation: cookieShimmer 1.8s ease-in-out 1.1s 2;
}

.cookie-btn--outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.45);
}

.cookie-btn--ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 99995;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.cookie-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.cookie-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(45, 53, 97, 0.55);
    backdrop-filter: blur(4px);
}

.cookie-modal-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    padding: 24px 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.cookie-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f8f9fa;
    color: #2d3561;
    cursor: pointer;
}

.cookie-modal-panel h2 {
    margin: 0 0 8px;
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 20px;
    color: #2d3561;
}

.cookie-modal-intro {
    margin: 0 0 18px;
    font-size: 14px;
    color: #5a6c7d;
    line-height: 1.5;
}

.cookie-pref-item {
    padding: 14px 0;
    border-top: 1px solid #eef1f5;
}

.cookie-pref-item p {
    margin: 6px 0 0;
    font-size: 13px;
    color: #6b7c8f;
    line-height: 1.5;
}

.cookie-pref-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cookie-pref-head strong {
    font-size: 14px;
    color: #2d3561;
}

.cookie-pref-badge {
    font-size: 11px;
    font-weight: 800;
    color: #7b2d8e;
    background: #f5f0ff;
    padding: 4px 10px;
    border-radius: 999px;
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch-slider {
    position: absolute;
    inset: 0;
    background: #d5dbe3;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cookie-switch-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.cookie-switch input:checked + .cookie-switch-slider {
    background: #7b2d8e;
}

.cookie-switch input:checked + .cookie-switch-slider::before {
    transform: translateX(20px);
}

.cookie-pref-item--locked .cookie-switch {
    opacity: 0.5;
    pointer-events: none;
}

.cookie-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eef1f5;
}

.cookie-modal-actions .cookie-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, #7b2d8e, #9b6fd4);
}

.cookie-modal-actions .cookie-btn--outline {
    color: #7b2d8e;
    border-color: rgba(123, 45, 142, 0.35);
}

body.cookie-modal-open {
    overflow: hidden;
}

.footer-legal-links {
    margin-top: 10px !important;
    font-size: 12px !important;
    opacity: 0.75 !important;
}

.footer-legal-links a,
.footer-legal-link-btn {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
    font-weight: 600;
    margin: 0 8px;
}

.footer-legal-link-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.footer-legal-links a:hover,
.footer-legal-link-btn:hover {
    color: #ffd680;
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner.is-visible,
    .cookie-banner-icon,
    .cookie-crumb,
    .cookie-sparkle,
    .cookie-banner-glow,
    .cookie-banner.is-visible .cookie-banner-inner::after,
    .cookie-banner.is-visible .cookie-banner-text h2,
    .cookie-banner.is-visible .cookie-banner-text p,
    .cookie-banner.is-visible .cookie-banner-actions .cookie-btn,
    .cookie-banner.is-visible .cookie-btn--primary .cookie-btn-shine {
        animation: none !important;
    }

    .cookie-banner.is-visible {
        opacity: 1;
        transform: none;
    }

    .cookie-banner.is-visible .cookie-banner-text h2,
    .cookie-banner.is-visible .cookie-banner-text p,
    .cookie-banner.is-visible .cookie-banner-actions .cookie-btn {
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .cookie-banner-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner-actions .cookie-btn {
        width: 100%;
        text-align: center;
    }
}

/* Pagina politica cookie-uri */
.legal-hero {
    background: linear-gradient(135deg, #4a90e2 0%, #7b2d8e 55%, #2d3561 100%);
    padding: 56px 20px 64px;
    text-align: center;
    color: #fff;
}

.legal-hero-emoji {
    display: block;
    font-size: 40px;
    margin-bottom: 10px;
}

.legal-hero h1 {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    margin-bottom: 10px;
}

.legal-hero .lead {
    max-width: 640px;
    margin: 0 auto;
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.6;
}

.legal-content-wrap {
    padding: 40px 20px 70px;
    background: linear-gradient(180deg, #fff9f0 0%, #fff 100%);
}

.legal-content-card {
    max-width: 780px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 10px 32px rgba(45, 53, 97, 0.1);
    border: 1px solid rgba(123, 45, 142, 0.08);
}

.legal-updated {
    font-size: 13px;
    color: #95a5a6;
    margin-bottom: 20px;
}

.legal-content-card h2 {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 20px;
    color: #2d3561;
    margin: 24px 0 10px;
}

.legal-content-card h2:first-of-type {
    margin-top: 0;
}

.legal-content-card p,
.legal-content-card li {
    color: #4a5568;
    font-size: 15px;
    line-height: 1.75;
}

.legal-content-card ul {
    margin: 10px 0 0;
    padding-left: 22px;
}

.legal-inline-btn {
    background: none;
    border: none;
    padding: 0;
    color: #7b2d8e;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

.legal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px dashed rgba(123, 45, 142, 0.15);
}

.legal-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #7b2d8e, #9b6fd4);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
}

.legal-action-btn--outline {
    background: #fff;
    color: #7b2d8e;
    border: 2px solid rgba(123, 45, 142, 0.25);
}
