/* Aviso de cookies (layouts/cookie_consent.blade.php). Común a todos los espacios:
   los botones usan .btn/.btn-primary del espacio, así que toman sus colores. */

.ck-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 10050;
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 22px;
    background: #fff;
    color: #222;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
    font-size: 1.35rem;
    line-height: 1.5;
}

.ck-banner[hidden],
.ck-modal[hidden] {
    display: none;
}

.ck-banner__text {
    flex: 1 1 auto;
    min-width: 0;
}

.ck-banner__title {
    display: block;
    margin-bottom: 4px;
    font-size: 1.5rem;
}

.ck-banner__text p {
    margin: 0;
}

.ck-banner__text a {
    text-decoration: underline;
}

.ck-banner__actions,
.ck-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
}

.ck-banner__actions .btn,
.ck-modal__actions .btn {
    margin: 0;
    min-width: 120px;
}

.ck-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ck-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
}

.ck-modal__box {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 26px 26px 22px;
    background: #fff;
    color: #222;
    border-radius: 10px;
    font-size: 1.35rem;
    line-height: 1.5;
}

.ck-modal__title {
    margin: 0 32px 14px 0;
}

.ck-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    border: 0;
    background: none;
    font-size: 2rem;
    line-height: 1;
    color: inherit;
    cursor: pointer;
}

.ck-modal__actions {
    margin-top: 18px;
    justify-content: flex-end;
}

.ck-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid #e5e5e5;
}

.ck-option p {
    margin: 2px 0 0;
    color: #666;
}

/* Interruptor */
.ck-switch {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    margin: 2px 0 0;
    cursor: pointer;
}

.ck-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.ck-switch span {
    position: absolute;
    inset: 0;
    background: #c8c8c8;
    border-radius: 24px;
    transition: background .2s;
    pointer-events: none;
}

.ck-switch span::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
}

.ck-switch input:checked + span {
    background: #2e7d32;
}

.ck-switch input:checked + span::after {
    transform: translateX(18px);
}

.ck-switch input:disabled + span {
    opacity: .6;
}

.ck-switch input:focus-visible + span {
    outline: 2px solid #1565c0;
    outline-offset: 2px;
}

/* Vídeos bloqueados hasta aceptar las cookies de vídeos */
.ck-media-frame {
    position: relative;
}

.ck-media-frame--blocked {
    min-height: 260px;
    background: #111 center / cover no-repeat;
}

/* el iframe vacío taparía la miniatura */
.ck-media-frame--blocked iframe {
    visibility: hidden;
}

.ck-media-gate {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    text-align: center;
    font-size: 1.4rem;
}

.ck-media-gate p {
    margin: 0;
    max-width: 420px;
}

@media (max-width: 767px) {
    .ck-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }

    .ck-banner__actions .btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .ck-modal__actions .btn {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ck-switch span,
    .ck-switch span::after {
        transition: none;
    }
}
