/* =====================================================
   BOTÓN PRIVACIDAD DEL SIDEBAR
===================================================== */

.sidebar-privacy-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 20px;

    border: 0;
    border-radius: 14px;

    background: transparent;
    color: #fff;

    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    text-align: left;

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

.sidebar-privacy-button:hover {
    background: rgba(255, 255, 255, 0.08);
}


/* =====================================================
   MODAL
===================================================== */

.privacy-modal {
    position: fixed;
    inset: 0;

    display: grid;
    place-items: center;

    padding: 28px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 3000;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.privacy-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =====================================================
   BACKDROP
===================================================== */

.privacy-modal__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.86);

    backdrop-filter: blur(5px);
}


/* =====================================================
   CONTENEDOR
===================================================== */

.privacy-modal__dialog {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;

    width: min(1120px, 96vw);
    max-height: min(900px, 92vh);

    overflow: hidden;

    border: 2px solid #526fd6;
    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            rgba(3, 3, 20, 0.99),
            rgba(0, 0, 8, 1)
        );

    color: #fff;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.65),
        0 0 40px rgba(54, 72, 202, 0.12);

    transform: translateY(30px) scale(0.97);

    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.privacy-modal.is-open .privacy-modal__dialog {
    transform: translateY(0) scale(1);
}


/* =====================================================
   HEADER DEL MODAL
===================================================== */

.privacy-modal__header {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 105px;
    padding: 26px 85px;

    border-bottom: 1px solid rgba(82, 111, 214, 0.25);

    background: rgba(0, 0, 9, 0.96);
}

.privacy-modal__header h2 {
    margin: 0;

    color: #fff;

    font-size: clamp(1.65rem, 3vw, 2.6rem);
    font-weight: 300;
    line-height: 1.1;

    letter-spacing: 0.13em;
    text-align: center;
    text-transform: uppercase;
}


/* =====================================================
   BOTÓN CERRAR
===================================================== */

.privacy-modal__close {
    position: absolute;
    top: 50%;
    right: 30px;

    width: 48px;
    height: 48px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.07);

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        background-color 0.25s ease,
        transform 0.25s ease;
}

.privacy-modal__close:hover {
    background: rgba(255, 255, 255, 0.16);

    transform:
        translateY(-50%)
        rotate(90deg);
}

.privacy-modal__close span {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 27px;
    height: 3px;

    border-radius: 999px;

    background: #fff;
}

.privacy-modal__close span:first-child {
    transform:
        translate(-50%, -50%)
        rotate(45deg);
}

.privacy-modal__close span:last-child {
    transform:
        translate(-50%, -50%)
        rotate(-45deg);
}


/* =====================================================
   CONTENIDO CON SCROLL
===================================================== */

.privacy-modal__content {
    overflow-y: auto;
    overscroll-behavior: contain;

    padding: 28px 34px 38px;

    scrollbar-width: thin;
    scrollbar-color: #526fd6 rgba(255, 255, 255, 0.05);
}

.privacy-modal__content::-webkit-scrollbar {
    width: 9px;
}

.privacy-modal__content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

.privacy-modal__content::-webkit-scrollbar-thumb {
    border-radius: 999px;

    background: #526fd6;
}


/* =====================================================
   ACORDEÓN
===================================================== */

.terms-wrap {
    display: flex;
    flex-direction: column;

    gap: 16px;

    width: 100%;
}

.term-item {
    overflow: hidden;

    border: 2px solid #4268e3;
    border-radius: 10px;

    background: #2245bf;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}


/* =====================================================
   SUMMARY
===================================================== */

.term-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    min-height: 62px;
    padding: 16px 22px;

    list-style: none;

    color: #fff;

    font-size: clamp(1rem, 1.7vw, 1.25rem);
    font-weight: 800;
    line-height: 1.25;

    cursor: pointer;

    user-select: none;

    transition:
        background-color 0.25s ease,
        filter 0.25s ease;
}

.term-head::-webkit-details-marker {
    display: none;
}

.term-head::marker {
    display: none;
}

.term-head:hover {
    background: rgba(255, 255, 255, 0.055);
}


/* =====================================================
   FLECHA
===================================================== */

.term-head__arrow {
    flex: 0 0 auto;

    width: 10px;
    height: 10px;

    border-right: 3px solid #b8ccff;
    border-bottom: 3px solid #b8ccff;

    transform: rotate(45deg);

    transition: transform 0.3s ease;
}

.term-item[open] .term-head__arrow {
    transform: rotate(225deg);
}


/* =====================================================
   CONTENIDO DEL ACORDEÓN
===================================================== */

.term-body {
    padding: 16px 22px 20px;

    border-top: 2px solid #4268e3;

    background:
        linear-gradient(
            180deg,
            #2447bd,
            #2243b2
        );

    color: rgba(255, 255, 255, 0.96);

    font-size: clamp(0.94rem, 1.45vw, 1.12rem);
    line-height: 1.55;
}

.term-body p {
    margin: 0 0 13px;
}

.term-body p:last-child {
    margin-bottom: 0;
}

.term-body ul,
.term-body ol {
    margin: 12px 0 0;
    padding-left: 24px;
}

.term-body li {
    margin-bottom: 8px;
}

.term-body strong {
    color: #fff;
}


/* =====================================================
   BLOQUEO DEL BODY
===================================================== */

body.privacy-modal-open {
    overflow: hidden;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 900px) {

    .privacy-modal {
        padding: 18px;
    }

    .privacy-modal__dialog {
        width: 100%;
        max-height: 94vh;

        border-radius: 24px;
    }

    .privacy-modal__header {
        min-height: 90px;
        padding-inline: 75px;
    }

    .privacy-modal__close {
        right: 20px;
    }

    .privacy-modal__content {
        padding: 22px 20px 30px;
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 600px) {

    .privacy-modal {
        padding: 0;
    }

    .privacy-modal__dialog {
        width: 100%;
        height: 100%;
        max-height: none;

        border: 0;
        border-radius: 0;
    }

    .privacy-modal__header {
        min-height: 82px;

        padding:
            20px
            65px
            20px
            18px;

        justify-content: flex-start;
    }

    .privacy-modal__header h2 {
        font-size: 1.3rem;
        letter-spacing: 0.08em;
        text-align: left;
    }

    .privacy-modal__close {
        right: 13px;

        width: 43px;
        height: 43px;
    }

    .privacy-modal__content {
        padding: 17px 13px 28px;
    }

    .terms-wrap {
        gap: 11px;
    }

    .term-item {
        border-radius: 8px;
    }

    .term-head {
        min-height: 57px;

        padding: 14px 15px;

        font-size: 0.94rem;
    }

    .term-body {
        padding: 15px;

        font-size: 0.9rem;
        line-height: 1.5;
    }

}


/* =====================================================
   ACCESIBILIDAD
===================================================== */

.privacy-modal__close:focus-visible,
.term-head:focus-visible,
.sidebar-privacy-button:focus-visible {
    outline: 3px solid #ffd000;
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {

    .privacy-modal,
    .privacy-modal__dialog,
    .privacy-modal__close,
    .term-head__arrow {
        transition: none;
    }

}