/* ================================
   COOKIE BANNER
================================ */

.cookie-banner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    color: #2c3e50;
    padding: 40px;
    width: 540px;
    max-width: 95%;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    z-index: 9999;
    font-family: 'Nunito Sans', sans-serif;
    text-align: left;
}

.cookie-banner h2 {
    margin: 0 0 20px 0;
}

/* ================================
   COOKIE OPTIONS
================================ */

.cookie-option {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: relative; /* for absolute slider */
}

.cookie-option p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    flex: 1;               /* text takes available space */
    min-width: 0;          /* allows text to wrap */
    word-break: break-word; 
    padding-right: 70px;   /* space for slider */
}

.cookie-option .switch {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    flex-shrink: 0;
}

/* ================================
   ACTION BUTTONS
================================ */

.cookie-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

.button-accept,
.button-decline {
    flex: 1;
    padding: 12px;
    font-size: 0.95rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

/* Primary button */
.button-accept {
    background: #6A994E;
    color: #fff;
}

.button-accept:hover {
    background: #5b8642;
    transform: translateY(-2px);
}

/* Secondary button */
.button-decline {
    background: #ddd;
    color: #333;
}

.button-decline:hover {
    background: #ccc;
    transform: translateY(-2px);
}

/* ================================
   LINKS
================================ */

.priv-pol {
    color: #6A994E;
    text-decoration: underline;
    cursor: pointer;
}

/* ================================
   TOGGLE SWITCH
================================ */

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider,
.slider-essential {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 34px;
    background-color: #ccc;
    transition: 0.4s;
}

.slider {
    cursor: pointer;
}

.slider-essential {
    cursor: default;
}

/* knob */
.slider::before,
.slider-essential::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.4s;
}

/* active states */
.switch input:checked + .slider {
    background-color: #6A994E;
}

.switch input:checked + .slider::before,
.switch input:checked + .slider-essential::before {
    transform: translateX(24px);
}

.switch input:checked + .slider-essential {
    background-color: #828d7c;
}

/* ================================
   MOBILE OPTIMIZATION
================================ */

@media (max-width: 480px) {
    .cookie-banner {
        padding: 25px 18px;
        border-radius: 14px;
    }

    .cookie-actions {
        gap: 8px;
    }

    .button-accept,
    .button-decline {
        font-size: 0.85rem;
        padding: 10px;
    }

    .cookie-option p {
        font-size: 0.85rem;
        padding-right: 60px; /* keep slider visible */
    }

    .cookie-option {
        gap: 10px;
    }
}