/* COOKIE CONSENT MODAL */
.cookie-consent-modal {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 526px;
    max-width: 90%;
    background: linear-gradient(102deg, #1E3075 17.51%, #3692FF 195.81%);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow: visible;
    color: white;
}

/* Background animation container INSIDE modal */
.consent-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 14px;
}

.animation-stage {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    perspective: 80vmin;
    position: relative;
    overflow: hidden;
}

.animation-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.flying-container {
    width: 100%;
    height: 100%;
    transform-origin: 100% 50%;
    rotate: y 40deg;
    mask: linear-gradient(90deg, #0000 0 40px, #fff, #0000 calc(100% - 40px) 100%);
    position: relative;
    container-type: inline-size;
}

.fly-particle {
    position: absolute;
    width: 40px;
    aspect-ratio: 1;
    top: calc(var(--y) * 1%);
    background: hsl(var(--hue) 90% 60%);
    animation-name: travelInside;
    animation-iteration-count: infinite;
    animation-delay: calc(var(--d) * -1s);
    animation-duration: calc(var(--a) * 1s);
    border-radius: 8px;
    filter: blur(0.5px);
    box-shadow: 0 0 8px currentColor;
    will-change: transform;
    opacity: 0.85;
}

@keyframes travelInside {
    0% {
        translate: 100cqi 0;
        opacity: 0.9;
        transform: scale(0.9);
    }
    100% {
        translate: -50% 0;
        opacity: 0.2;
        transform: scale(0.7);
    }
}

/* CONTENT LAYER */
.cookie-consent-content {
    position: relative;
    z-index: 2;
    padding: 28px;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.cookie-consent-title {
    text-align: center;
    font-size: 26px;
    margin-bottom: 16px;
    font-weight: 600;
    position: relative;
    z-index: 3;
}

.cookie-consent-text {
    font-size: 14.5px;
    line-height: 1.65;
    margin-bottom: 20px;
    opacity: 0.92;
    overflow-y: auto;
    padding-right: 5px;
    position: relative;
    z-index: 3;
    background: rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 8px 12px;
}

.cookie-consent-text::-webkit-scrollbar {
    width: 5px;
}

.cookie-consent-text::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
    position: relative;
    width: 100%;
    z-index: 3;
}

.cookie-consent-btn {
    flex: 1;
    padding: 13px;
    border: none;
    border-radius: 7px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
}

.cookie-consent-btn.accept {
    background: #00EBC4;
    color: #1E3075;
}

.cookie-consent-btn.accept:hover {
    background: #00d4b0;
    transform: translateY(-2px);
}

.cookie-consent-btn.decline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.cookie-consent-btn.decline:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.cookie-consent-btn.preferences {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.cookie-consent-btn.preferences:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

/* Preferences section - NATURAL FLOW */
.cookie-preferences {
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    z-index: 3;
    position: relative;
    margin-top: 0;
}

.cookie-preferences.expanded {
    max-height: 600px;
    margin-top: 16px;
}

.preferences-content {
    padding-top: 8px;
}

.preference-item {
    background-color: rgba(30, 48, 117, 0.85);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    backdrop-filter: blur(3px);
}

.preference-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.preference-title {
    font-weight: 500;
    font-size: 15.5px;
}

.preference-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.always-active {
    color: #00EBC4;
    font-size: 13.5px;
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3692FF;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 17px;
    width: 17px;
    left: 3px;
    bottom: 2.5px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #00EBC4;
}

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

.arrow {
    width: 13px;
    height: 13px;
    border-right: 2.5px solid white;
    border-bottom: 2.5px solid white;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.arrow.open {
    transform: rotate(-135deg);
}

.preference-content {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 13.5px;
    line-height: 1.55;
    opacity: 0.92;
}

.preference-content.active {
    padding: 16px;
    max-height: 150px;
}

@media (max-width: 600px) {
    .cookie-consent-modal {
        width: 92%;
        right: 4%;
        left: auto;
        bottom: 20px;
    }

    .cookie-consent-buttons {
        flex-direction: column;
    }
}
