/* ============================================
   CODEX Gaming Store - Baner cookies (RODO)
   Motyw: zielono-czarny, full-width, animowany
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
    border-top: 2px solid #00ff00;
    padding: 22px 30px;
    z-index: 9999;
    box-shadow: 0 -12px 48px rgba(0, 255, 65, 0.2);
    transform: translateY(110%);
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 95vh;
    overflow-y: auto;
    font-family: 'Inter', 'Roboto', sans-serif;

    /* Animacja wejścia – z animacją glow */
    opacity: 0;
}

.cookie-banner.visible {
    transform: translateY(0);
    opacity: 1;
    animation: cookieBannerGlow 2.5s ease-in-out infinite alternate;
}

@keyframes cookieBannerGlow {
    0% {
        box-shadow: 0 -12px 48px rgba(0, 255, 65, 0.15);
        border-top-color: #00ff00;
    }
    100% {
        box-shadow: 0 -12px 64px rgba(0, 255, 65, 0.35);
        border-top-color: #39ff14;
    }
}

/* Delikatny gradient na górnej krawędzi – efekt "scanline" */
.cookie-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        #00ff00 20%,
        #39ff14 50%,
        #00ff00 80%,
        transparent 100%);
    opacity: 0.6;
    pointer-events: none;
}

.cookie-banner__inner {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   TREŚĆ
   ============================================ */

.cookie-banner__title {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    font-weight: 700;
    color: #00ff00;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
}

.cookie-banner__title::before {
    content: "🍪";
    font-size: 24px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 65, 0.6));
    animation: cookieWiggle 3s ease-in-out infinite;
}

@keyframes cookieWiggle {
    0%, 90%, 100% { transform: rotate(0deg); }
    93% { transform: rotate(-12deg); }
    96% { transform: rotate(12deg); }
}

.cookie-banner__text {
    color: #b0b0b0;
    font-size: 14.5px;
    line-height: 1.65;
    margin: 0;
    max-width: 900px;
}

.cookie-banner__text a {
    color: #00ff00;
    text-decoration: none;
    border-bottom: 1px dashed #00ff00;
    transition: all 0.25s;
    padding-bottom: 1px;
}

.cookie-banner__text a:hover {
    color: #39ff14;
    border-bottom-color: #39ff14;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
}

/* ============================================
   PANEL PREFERENCJI (rozwijany)
   ============================================ */

.cookie-banner__preferences {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: #111111;
    border-radius: 10px;
    border: 1px solid #333333;
    margin-top: 14px;
    animation: prefsSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner__preferences.open {
    display: flex;
}

@keyframes prefsSlide {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid transparent;
}

.cookie-option:hover {
    background: #1a1a1a;
    border-color: #2a2a2a;
    transform: translateX(4px);
}

.cookie-option input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #00ff00;
    flex-shrink: 0;
    transition: transform 0.2s;
}

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

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

.cookie-option__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cookie-option__label {
    font-weight: 600;
    color: #ffffff;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-option__label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00ff00;
    box-shadow: 0 0 8px #00ff00;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.cookie-option:hover .cookie-option__label::before {
    opacity: 1;
}

.cookie-option__desc {
    color: #808080;
    font-size: 12.5px;
    line-height: 1.55;
}

/* ============================================
   PRZYCISKI
   ============================================ */

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.cookie-btn {
    padding: 13px 26px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    flex: 1;
    min-width: 150px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

/* Efekt shine przy hover */
.cookie-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent);
    transition: left 0.5s;
}

.cookie-btn:hover::before {
    left: 100%;
}

.cookie-btn--primary {
    background: #00ff00;
    color: #0a0a0a;
    box-shadow: 0 0 24px rgba(0, 255, 65, 0.3);
}

.cookie-btn--primary:hover {
    background: #39ff14;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 255, 65, 0.55);
}

.cookie-btn--primary:active {
    transform: translateY(0);
}

.cookie-btn--secondary {
    background: transparent;
    color: #00ff00;
    border: 1px solid #00ff00;
}

.cookie-btn--secondary:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.35);
    transform: translateY(-2px);
}

.cookie-btn--ghost {
    background: transparent;
    color: #b0b0b0;
    border: 1px solid #333333;
}

.cookie-btn--ghost:hover {
    color: #ffffff;
    border-color: #00ff00;
    transform: translateY(-2px);
    box-shadow: 0 0 16px rgba(0, 255, 65, 0.2);
}

/* ============================================
   RESPONSYWNOŚĆ
   ============================================ */

/* Tablet+ : układ poziomy, pełna szerokość */
@media (min-width: 768px) {
    .cookie-banner {
        padding: 26px 40px;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .cookie-banner__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 40px;
    }

    .cookie-banner__content {
        flex: 1 1 auto;
        min-width: 0;
    }

    .cookie-banner__actions {
        flex: 0 0 auto;
        display: flex;
        flex-direction: row;
        gap: 12px;
        margin-top: 0;
    }

    .cookie-btn {
        flex: 0 0 auto;
        min-width: auto;
        padding: 13px 24px;
    }
}

/* Duże ekrany: więcej przestrzeni */
@media (min-width: 1400px) {
    .cookie-banner {
        padding: 28px 60px;
    }

    .cookie-banner__inner {
        gap: 60px;
    }

    .cookie-banner__title {
        font-size: 22px;
    }

    .cookie-banner__text {
        font-size: 15px;
    }

    .cookie-btn {
        padding: 14px 30px;
        font-size: 15px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .cookie-banner {
        padding: 18px 16px;
    }

    .cookie-banner__title {
        font-size: 17px;
        letter-spacing: 1px;
    }

    .cookie-banner__text {
        font-size: 13.5px;
    }

    .cookie-btn {
        padding: 12px 18px;
        font-size: 13.5px;
        min-width: 100%;
        flex: 1 1 100%;
    }

    .cookie-option {
        padding: 10px 8px;
    }
}

/* Ukryj całkowicie */
.cookie-banner[aria-hidden="true"] {
    display: none;
}

/* Reduced motion – dostępność */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-banner__preferences,
    .cookie-btn,
    .cookie-option {
        transition: none !important;
        animation: none !important;
    }
    .cookie-banner.visible {
        animation: none !important;
    }
}
