/* =========================================================
   20. COOKIE CONSENT SYSTEM
   Purpose:
   Protected subsystem. Multiple overlapping rules for
   .cookie-banner and .show are intentionally retained
   so the combined animation + opacity + pointer-events
   behaviour is preserved.
   ========================================================= */

.cookie-banner {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    background: #222;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: bottom 0.5s ease;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 10px;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-banner p {
    margin: 0;
    flex: 1 1 300px;
}

.cookie-banner .cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-banner .btn-accept,
.cookie-banner .btn-decline {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.cookie-banner .btn-accept {
    background: #00C977;
    color: #fff;
}

.cookie-banner .btn-accept:hover {
    background: #00a461;
}

.cookie-banner .btn-decline {
    background: transparent;
    color: #f00;
    border: 1px solid #ccc;
}

.cookie-banner .btn-decline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* Later show + animation layer */
.cookie-banner.show {
    bottom: 0;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        bottom: -100px;
        opacity: 0;
    }
    to {
        bottom: 0;
        opacity: 1;
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.cookie-policy-link {
    color: #4da6ff;
    font-size: 0.85rem;
    text-decoration: underline;
}

.cookie-policy-link:hover {
    color: #80bfff;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    color: #222;
    max-width: 540px;
    width: 90%;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cookie-category {
    margin: 20px 0;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.cookie-category label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.cookie-category small {
    display: block;
    margin-top: 6px;
    color: #555;
}

.modal-buttons {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-preferences,
.btn-secondary {
    background: #444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-preferences:hover,
.btn-secondary:hover {
    background: #666;
}

.btn-reject {
    background: transparent;
    border: 2px solid #e63946;
    color: #e63946;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
}

.btn-reject:hover {
    background: #e63946;
    color: white;
}

@media (max-width: 600px) {
    .cookie-buttons-main {
        flex-direction: column;
        width: 100%;
    }

    .cookie-buttons-main button {
        width: 100%;
        margin: 6px 0;
    }
}

/* Smooth transition improvements (final layer) */
.cookie-banner {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out, bottom 0.5s ease;
}

.cookie-banner.show {
    opacity: 1;
    pointer-events: auto;
}

.cookie-modal {
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.cookie-modal[style*="display: flex"] {
    opacity: 1;
    /* JS sets display:flex; this rule adds the fade */
}
