#ccf-preferences {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.65);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #222;
}

#ccf-preferences {
    z-index: 999999;
}

#ccf-preferences .ccf-pref-pannel {
    position: relative;
    z-index: 1000000;
}

/* Banner */

#ccf-preferences .ccf-pref-pannel {
    width: 100%;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

#ccf-preferences .ccf-pref-pannel-inner {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 25px 0;
}

#ccf-preferences .ccf-pref-pannel h2 {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
    color: #111;
}

#ccf-preferences .ccf-pref-pannel p {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.6;
}

#ccf-preferences .ccf-pref-pannel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Botones */

#ccf-preferences .ccf-pref-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 20px;
    border: 1px solid #222;
    border-radius: 3px;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#ccf-preferences .ccf-pref-btn:hover {
    background: #f2f2f2;
}

#ccf-preferences .ccf-pref-btn-primary {
    background: #111;
    color: #fff;
}

#ccf-preferences .ccf-pref-btn-primary:hover {
    background: #333;
}

#ccf-preferences .ccf-pref-btn-secondary {
    background: #fff;
    color: #111;
}

#ccf-preferences .ccf-pref-btn-danger {
    background: #fff;
    color: #111;
}

/* Configuración */

#ccf-preferences .ccf-pref-settings {
    position: absolute;
    inset: 0;
    display: none;
    overflow-y: auto;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.65);
}

#ccf-preferences.ccf-pref-settings-open .ccf-pref-settings {
    display: block;
}

#ccf-preferences.ccf-pref-settings-open .ccf-pref-pannel {
    display: none;
}

#ccf-preferences .ccf-pref-settings-inner {
    position: relative;
    width: min(850px, 100%);
    margin: 20px auto;
    padding: 35px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.25);
}

#ccf-preferences .ccf-pref-settings h2 {
    margin: 0 40px 10px 0;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
    color: #111;
}

#ccf-preferences .ccf-pref-settings-intro {
    margin: 0 0 25px;
    color: #555;
}

/* Cerrar configuración */

#ccf-preferences .ccf-pref-close-settings {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: #fff;
    color: #222;
    font-size: 22px;
    line-height: 34px;
    cursor: pointer;
}

#ccf-preferences .ccf-pref-close-settings:hover {
    background: #f2f2f2;
}

/* Categorías */

#ccf-preferences .ccf-pref-settings-category {
    padding: 20px 0;
    border-top: 1px solid #ddd;
}

#ccf-preferences .ccf-pref-settings-category:last-of-type {
    border-bottom: 1px solid #ddd;
}

#ccf-preferences .ccf-pref-settings-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#ccf-preferences .ccf-pref-settings-category h3 {
    margin: 0 0 5px;
    font-size: 17px;
    line-height: 1.3;
}

#ccf-preferences .ccf-pref-settings-category p {
    margin: 0;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

/* Estado */

#ccf-preferences .ccf-pref-status {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

/* Switch */

#ccf-preferences .ccf-pref-settings-switch {
    position: relative;
    flex: 0 0 auto;
    width: 52px;
    height: 28px;
}

#ccf-preferences .ccf-pref-settings-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

#ccf-preferences .ccf-pref-settings-switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: #bbb;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#ccf-preferences .ccf-pref-settings-switch-slider::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

#ccf-preferences .ccf-pref-settings-switch input:checked+.ccf-pref-settings-switch-slider {
    background: #111;
}

#ccf-preferences .ccf-pref-settings-switch input:checked+.ccf-pref-settings-switch-slider::before {
    transform: translateX(24px);
}

#ccf-preferences .ccf-pref-settings-switch input:focus+.ccf-pref-settings-switch-slider {
    outline: 2px solid #555;
    outline-offset: 2px;
}


#ccf-preferences .ccf-pref-settings-required {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    background: #eee;
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

/* Botón guardar */

#ccf-preferences .ccf-pref-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

/* Política */

#ccf-preferences .ccf-policy {
    margin-top: 15px;
    font-size: 12px;
}

#ccf-preferences .ccf-policy a {
    color: #222;
    text-decoration: underline;
}

/* Responsive */

@media (max-width: 700px) {
    #ccf-preferences {
        align-items: stretch;
    }

    #ccf-preferences .ccf-pref-pannel {
        align-self: flex-end;
    }

    #ccf-preferences .ccf-pref-pannel-inner {
        width: calc(100% - 30px);
        padding: 20px 0;
    }

    #ccf-preferences .ccf-pref-pannel h2 {
        font-size: 19px;
    }

    #ccf-preferences .ccf-pref-pannel p {
        font-size: 13px;
    }

    #ccf-preferences .ccf-pref-pannel-actions {
        display: block;
    }

    #ccf-preferences .ccf-pref-btn {
        width: 100%;
        margin-bottom: 8px;
    }

    #ccf-preferences .ccf-pref-settings {
        padding: 10px;
    }

    #ccf-preferences .ccf-pref-settings-inner {
        margin: 0 auto;
        padding: 25px 20px;
    }

    #ccf-preferences .ccf-pref-settings h2 {
        font-size: 20px;
    }

    #ccf-preferences .ccf-pref-settings-category-header {
        align-items: flex-start;
    }

    #ccf-preferences .ccf-pref-settings-actions {
        display: block;
    }

    #ccf-preferences .ccf-pref-settings-actions .ccf-pref-btn {
        margin-bottom: 8px;
    }
}