/* ============================================================
   AYUDA CESIONES — Banner de Cookies (RGPD)
   ============================================================ */

/* --- Primera capa: Banner --- */
.cb-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 24px rgba(0,0,0,.1);
    z-index: 99999;
    padding: 1.25rem 1.5rem;
    animation: cbSlideUp .35s ease-out;
}

@keyframes cbSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.cb-banner__content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cb-banner__text {
    flex: 1;
}

.cb-banner__text strong {
    display: block;
    font-size: .95rem;
    color: #111827;
    margin-bottom: .35rem;
}

.cb-banner__text p {
    font-size: .84rem;
    color: #4b5563;
    line-height: 1.55;
    margin: 0;
}

.cb-banner__text a {
    color: #1d4ed8;
    text-decoration: underline;
}

.cb-banner__buttons {
    display: flex;
    gap: .6rem;
    flex-shrink: 0;
}

/* Botones */
.cb-btn {
    padding: .6rem 1.2rem;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
    white-space: nowrap;
}

.cb-btn--primary {
    background: #1d4ed8;
    color: #fff;
}
.cb-btn--primary:hover {
    background: #1e40af;
}

.cb-btn--outline {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}
.cb-btn--outline:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* --- Segunda capa: Panel de configuración --- */
.cb-panel {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    animation: cbFadeIn .25s ease-out;
}

@keyframes cbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cb-panel__box {
    background: #fff;
    border-radius: 16px;
    width: 94%;
    max-width: 540px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
}

.cb-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.cb-panel__header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cb-panel__close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    padding: .25rem;
    line-height: 1;
}
.cb-panel__close:hover {
    color: #111827;
}

.cb-panel__body {
    padding: 1.25rem 1.5rem;
}

.cb-panel__intro {
    font-size: .85rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

/* Categorías */
.cb-cat {
    padding: 1rem 0;
    border-top: 1px solid #f3f4f6;
}

.cb-cat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .4rem;
}

.cb-cat__info {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.cb-cat__info strong {
    font-size: .9rem;
    color: #111827;
}

.cb-cat__badge {
    font-size: .7rem;
    background: #ecfdf5;
    color: #065f46;
    padding: .15rem .55rem;
    border-radius: 20px;
    font-weight: 600;
}

.cb-cat__desc {
    font-size: .8rem;
    color: #6b7280;
    line-height: 1.55;
    margin: 0;
}

/* Toggle switch */
.cb-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cb-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cb-toggle__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: .25s;
}

.cb-toggle__slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .25s;
}

.cb-toggle input:checked + .cb-toggle__slider {
    background: #1d4ed8;
}

.cb-toggle input:checked + .cb-toggle__slider::before {
    transform: translateX(20px);
}

.cb-toggle--disabled .cb-toggle__slider {
    background: #10b981;
    cursor: default;
}

.cb-toggle--disabled input:checked + .cb-toggle__slider::before {
    transform: translateX(20px);
}

/* Footer del panel */
.cb-panel__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: right;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .cb-banner__content {
        flex-direction: column;
        align-items: stretch;
    }
    .cb-banner__buttons {
        flex-direction: column;
    }
    .cb-btn {
        width: 100%;
        text-align: center;
    }
}
