/* ==========================================================================
   EVENTO: LA CASA INVITA
   ========================================================================== */

.ap-event {
    --event-purple: #51305f;
    --event-yellow: #f4ff00;
    --event-white: #ffffff;
    --event-lilac: #e4afea;

    position: relative;
    isolation: isolate;

    width: 100%;
    min-height: 490px;

    display: grid;
    place-items: center;

    box-sizing: border-box;
    padding: 60px 24px;

    overflow: hidden;

    background-color: var(--event-purple);
    background-image:
        url("../img/banners/evento-casa-invita-desktop.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
        color: var(--event-white);

    font-family:
        var(--ap-font-body, "Open Sans", sans-serif);

    text-align: center;
}

.ap-event *,
.ap-event *::before,
.ap-event *::after {
    box-sizing: border-box;
}


/* ==========================================================================
   CONTENIDO
   ========================================================================== */

.ap-event__content {
    position: relative;

    width: min(100%, 1100px);
    margin-inline: auto;

    display: grid;
    justify-items: center;

    gap: 18px;
}

.ap-event__eyebrow {
    color: var(--event-white);

    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.4;

    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ap-event h2 {
    margin: 0;

    color: var(--event-yellow);

    font-family:
        var(--ap-font-title, "Manrope", sans-serif);

    font-size: clamp(2.6rem, 4.5vw, 4.5rem);
    font-weight: 700;
    font-style: italic;
    line-height: 1.08;

    letter-spacing: -0.04em;
}

.ap-event__description {
    max-width: 560px;
    margin: 0;

    color: var(--event-lilac);

    font-size: clamp(1.25rem, 2.2vw, 1.9rem);
    font-weight: 600;
    line-height: 1.3;

    text-wrap: balance;
}


/* ==========================================================================
   BOTÓN DE REGISTRO
   ========================================================================== */

.ap-event__button {
    min-height: 60px;
    max-width: 100%;

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

    margin-top: 6px;
    padding: 13px 36px;

    border: 2px solid var(--event-yellow);
    border-radius: 999px;

    background: transparent;
    color: var(--event-yellow);

    font-family:
        var(--ap-font-title, "Manrope", sans-serif);

    font-size: clamp(1.3rem, 2.5vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;

    text-align: center;

    cursor: pointer;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.ap-event__button:hover {
    background: var(--event-yellow);
    color: var(--event-purple);

    transform: translateY(-2px);
}

.ap-event__button:active {
    transform: translateY(0);
}

.ap-event__button:focus-visible {
    outline: 3px solid var(--event-white);
    outline-offset: 5px;
}


/* ==========================================================================
   FECHA, HORA Y LUGAR
   ========================================================================== */

.ap-event__details {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 16px 32px;

    margin-top: 16px;
}

.ap-event__details span {
    color: var(--event-white);

    font-family:
        var(--ap-font-title, "Manrope", sans-serif);

    font-size: clamp(1rem, 1.7vw, 1.4rem);
    font-weight: 700;
    line-height: 1.4;
}


/* ==========================================================================
   INFORMACIÓN COMPLEMENTARIA
   ========================================================================== */

.ap-event__note {
    max-width: 900px;

    margin: 18px 0 0;

    color: var(--event-white);

    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    font-weight: 600;
    line-height: 1.6;

    text-wrap: balance;
}

.ap-event__support {
    color: #ead9ef;

    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
}


/* ==========================================================================
   CELULAR
   ========================================================================== */

@media (max-width: 600px) {

    .ap-event {
        min-height: auto;

        padding: 48px 20px;
    }

    .ap-event__content {
        gap: 16px;
    }

    .ap-event__button {
        width: 100%;

        min-height: 56px;

        padding: 14px 20px;
    }

    .ap-event__details {
        flex-direction: column;

        gap: 8px;

        margin-top: 12px;
    }

    .ap-event__note {
        margin-top: 8px;
    }

}


/* ==========================================================================
   MOVIMIENTO REDUCIDO
   ========================================================================== */

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

    .ap-event__button {
        transition: none;
    }

}

/* ==========================================================================
   MODAL DE REGISTRO
   ========================================================================== */

.ap-event-modal {
    position: fixed;

    width: min(520px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);

    margin: auto;
    padding: 36px;

    box-sizing: border-box;
    overflow-y: auto;

    border: 1px solid #e8dbe8;
    border-radius: 26px;

    background: #fff8ee;
    color: #2a1712;

    font-family:
        var(--ap-font-body, "Open Sans", sans-serif);

    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;

    box-shadow:
        0 24px 80px
        rgba(24, 10, 30, 0.25);
}

.ap-event-modal *,
.ap-event-modal *::before,
.ap-event-modal *::after {
    box-sizing: border-box;
}

.ap-event-modal::backdrop {
    background: rgba(24, 10, 30, 0.75);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.ap-event-modal [hidden] {
    display: none !important;
}


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

.ap-event-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #51305f;

    font: inherit;
    font-size: 2rem;
    line-height: 1;

    cursor: pointer;
}

.ap-event-modal__close:hover {
    background: #eee2f1;
}


/* ==========================================================================
   CABECERA
   ========================================================================== */

.ap-event-modal__header {
    padding-right: 16px;
}

.ap-event-modal__eyebrow {
    display: block;

    margin-bottom: 10px;

    color: #a80050;

    font-size: 0.76rem;
    font-weight: 700;

    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ap-event-modal__header h2 {
    margin: 0;

    color: #51305f;

    font-family:
        var(--ap-font-title, "Manrope", sans-serif);

    font-size: clamp(1.65rem, 5vw, 2rem);
    font-weight: 700;
    line-height: 1.15;

    letter-spacing: -0.03em;
}

.ap-event-modal__header p {
    margin: 14px 0 0;

    color: #74635c;

    font-size: 0.94rem;
    line-height: 1.6;
}

.ap-event-modal__availability {
    margin: 22px 0;
    padding: 12px 14px;

    border: 1px solid #e0d1e5;
    border-radius: 12px;

    background: #f0e7f3;
    color: #51305f;

    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.5;
}


/* ==========================================================================
   FORMULARIO
   ========================================================================== */

.ap-event-modal__form {
    display: grid;
    gap: 18px;
}

.ap-event-modal__field {
    display: grid;
    gap: 7px;
}

.ap-event-modal__field > span {
    color: #3a2925;

    font-size: 0.88rem;
    font-weight: 700;
}

.ap-event-modal__field input {
    width: 100%;
    min-height: 50px;

    padding: 12px 14px;

    border: 1px solid #d9cbc4;
    border-radius: 12px;

    background: #ffffff;
    color: #2a1712;

    font: inherit;
    font-size: 1rem;
}

.ap-event-modal__field input::placeholder {
    color: #93847c;
    opacity: 1;
}

.ap-event-modal__field input:focus-visible {
    border-color: #51305f;

    outline: 3px solid rgba(81, 48, 95, 0.18);
    outline-offset: 2px;
}


/* ==========================================================================
   CONDICIONES Y AUTORIZACIÓN
   ========================================================================== */

.ap-event-modal__terms {
    padding: 12px 14px;

    border: 1px solid #e5dcd5;
    border-radius: 12px;

    background: #ffffff;

    font-size: 0.82rem;
    line-height: 1.6;
}

.ap-event-modal__terms summary {
    color: #51305f;

    font-weight: 700;

    cursor: pointer;
}

.ap-event-modal__terms p {
    margin: 12px 0 0;

    color: #74635c;
}

.ap-event-modal__consent {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    color: #65554e;

    font-size: 0.8rem;
    line-height: 1.6;
}

.ap-event-modal__consent input {
    flex: 0 0 auto;

    width: 18px;
    height: 18px;

    margin: 4px 0 0;

    accent-color: #51305f;
}

.ap-event-modal__consent a {
    color: #a80050;

    text-decoration: underline;
    text-underline-offset: 3px;
}


/* ==========================================================================
   ENVÍO Y MENSAJES
   ========================================================================== */

.ap-event-modal__submit {
    width: 100%;
    min-height: 52px;

    padding: 13px 20px;

    border: 0;
    border-radius: 14px;

    background: #51305f;
    color: #ffffff;

    font-family:
        var(--ap-font-title, "Manrope", sans-serif);

    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;

    cursor: pointer;
}

.ap-event-modal__submit:hover:not(:disabled) {
    background: #40244c;
}

.ap-event-modal__submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ap-event-modal__message {
    margin-top: 20px;
    padding: 16px;

    border: 1px solid #e0d1e5;
    border-radius: 14px;

    background: #ffffff;
    color: #51305f;

    font-size: 0.94rem;
    line-height: 1.6;

    white-space: pre-line;
    overflow-wrap: anywhere;
}

.ap-event-modal__close:focus-visible,
.ap-event-modal__submit:focus-visible,
.ap-event-modal__terms summary:focus-visible,
.ap-event-modal__consent a:focus-visible,
.ap-event-modal__consent input:focus-visible {
    outline: 3px solid #a80050;
    outline-offset: 4px;
}


/* ==========================================================================
   MODAL EN CELULAR
   ========================================================================== */

@media (max-width: 600px) {

    .ap-event-modal {
        padding: 34px 22px 24px;

        border-radius: 22px;
    }

}

@media (max-width: 600px) {

    .ap-event {
        background-image:
            url("../img/banners/evento-casa-invita-mobile.jpg");
    }

}

/* ==========================================================================
   ANIMACIÓN DEL MODAL
   ========================================================================== */

.ap-event-modal {
    opacity: 0;

    transform:
        translateY(14px)
        scale(0.98);

    transition:
        opacity 220ms ease,
        transform 220ms ease;
}

.ap-event-modal.is-visible {
    opacity: 1;

    transform:
        translateY(0)
        scale(1);
}

.ap-event-modal::backdrop {
    background: rgba(24, 10, 30, 0);

    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);

    transition:
        background 220ms ease,
        backdrop-filter 220ms ease;
}

.ap-event-modal.is-visible::backdrop {
    background: rgba(24, 10, 30, 0.75);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

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

    .ap-event-modal,
    .ap-event-modal::backdrop {
        transition: none;
    }

}