/*
 * =========================================================
 * APRENDEPRO — BANNER DE COOKIES
 * =========================================================
 * CSS ordenado y formateado sin cambiar el diseño.
 * =========================================================
 */

.cookie-banner[hidden],
.cookie-modal[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    z-index: 9999;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px;
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid rgba(0, 0, 0, .12);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .12);
}

.cookie-banner-content {
    width: min(1100px, 100%);
    margin: 0 auto;
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: space-between;
}

.cookie-banner-text {
    max-width: 760px;
}

.cookie-banner-text h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.cookie-banner-text p {
    margin: 0 0 7px;
    line-height: 1.5;
    font-size: .92rem;
}

.cookie-link {
    font-size: .9rem;
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 11px 17px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: #111;
    color: #fff;
    border-color: #111;
}

.cookie-btn-secondary {
    background: #fff;
    color: #111;
    border-color: #999;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .55);
}

.cookie-modal-box {
    width: min(680px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.cookie-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.cookie-modal-header h2 {
    margin: 5px 0 0;
}

.cookie-close {
    border: 0;
    background: transparent;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 0;
    border-top: 1px solid rgba(0, 0, 0, .1);
}

.cookie-option strong,
.cookie-option span {
    display: block;
}

.cookie-option span {
    margin-top: 5px;
    line-height: 1.45;
    font-size: .9rem;
}

.cookie-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch span {
    position: absolute;
    inset: 0;
    background: #bbb;
    border-radius: 30px;
    cursor: pointer;
    transition: .2s;
}

.cookie-switch span:before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
}

.cookie-switch input:checked + span {
    background: #111;
}

.cookie-switch input:checked + span:before {
    transform: translateX(22px);
}

.cookie-switch input:disabled + span {
    opacity: .65;
    cursor: not-allowed;
}

.cookie-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, .1);
}

@media (max-width: 760px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .cookie-banner-actions {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .cookie-btn {
        width: 100%;
        white-space: normal;
    }

    .cookie-modal-box {
        padding: 22px;
    }

    .cookie-modal-actions {
        flex-direction: column;
    }
}
