/* ================================================= */
/* VARIABLES */
/* ================================================= */

:root {
    --cl-bg: #ffffffee;
    --cl-text: #333333;
    --cl-accept: #4c7347;
    --cl-reject: #cccccc;
    --cl-btn-text: #ffffff;
}

/* ================================================= */
/* BANNER PRINCIPAL */
/* ================================================= */

#cl-banner {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 92%;
    max-width: 720px;
    padding: 18px 24px;
    background: var(--cl-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.10);
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#cl-banner.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#cl-banner .cl-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#cl-banner p {
    margin: 0;
    font-size: 14px;
    color: var(--cl-text);
    line-height: 1.5;
    flex: 1;
}

/* ================================================= */
/* BOTONES */
/* ================================================= */

.cl-buttons {
    display: flex;
    gap: 10px;
}

.cl-btn {
    padding: 9px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cl-accept {
    background-color: var(--cl-accept);
    color: var(--cl-btn-text);
}

.cl-accept:hover {
    filter: brightness(0.95);
}

.cl-reject {
    background-color: var(--cl-reject);
    color: var(--cl-btn-text);
}

.cl-reject:hover {
    filter: brightness(0.95);
}

/* ================================================= */
/* RESPONSIVE */
/* ================================================= */

@media (max-width: 768px) {

    #cl-banner {
        left: 15px;
        right: 15px;
        width: auto;
        bottom: 15px;
        transform: translateY(20px);
        padding: 16px;
    }

    #cl-banner.show {
        transform: translateY(0);
    }

    #cl-banner .cl-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .cl-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cl-btn {
        width: 100%;
    }
}

/* ================================================= */
/* PESTAÑA */
/* ================================================= */

#cl-tab {
    position: fixed;
    bottom: 0;
    padding: 10px 16px;
    background-color: var(--cl-accept);
    color: var(--cl-btn-text);
    font-size: 13px;
    font-weight: 500;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 9998;
    transition: all 0.3s ease;
}

#cl-tab.left { left: 0; }
#cl-tab.right { right: 0; }

#cl-tab:hover {
    transform: translateY(-3px);
}

/* ================================================= */
/* MODAL */
/* ================================================= */

#cl-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#cl-modal.show {
    opacity: 1;
}

.cl-modal-content {
    position: relative;
    background: var(--cl-bg);
    padding: 30px 25px 25px;
    border-radius: 18px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
    transform: scale(0.92);
    transition: transform 0.25s ease;
}

#cl-modal.show .cl-modal-content {
    transform: scale(1);
}

.cl-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--cl-text);
}

.cl-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0;
    font-size: 14px;
    color: var(--cl-text);
}

/* BOTÓN CERRAR */

.cl-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    color: var(--cl-text);
    opacity: 0.5;
    transition: all 0.2s ease;
    padding: 0;
}

.cl-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.cl-close:focus {
    outline: none;
}

/* SWITCH */

.cl-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.cl-switch input {
    display: none;
}

.cl-slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    border-radius: 20px;
    transition: .3s;
}

.cl-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: .3s;
}

.cl-switch input:checked + .cl-slider {
    background-color: var(--cl-accept);
}

.cl-switch input:checked + .cl-slider:before {
    transform: translateX(20px);
}