/* =========================================================
   MODAL.CSS — Event Master
   Sistema limpio de modales públicos
   Versión: modal-system-v1
========================================================= */


/* =========================================================
   01 — Base del modal
========================================================= */

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
}

.app-modal.is-open {
    display: block;
}

.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 23, 22, 0.56);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.app-modal-panel {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(100%, 430px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-50%);
    padding: 22px 22px calc(24px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
    background: #fffaf7;
    box-shadow: 0 -18px 50px rgba(30, 23, 22, 0.20);
}


/* =========================================================
   02 — Header y cierre
========================================================= */

.app-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(242, 236, 233, 0.9);
    color: #6d625e;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.app-modal-header {
    padding-right: 46px;
    margin-bottom: 18px;
}

.app-modal-header h2 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 1.58rem;
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: -0.045em;
}

.app-modal-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.45;
}


/* =========================================================
   03 — Botones globales
========================================================= */

.app-modal .btn,
.app-modal button,
.app-modal a.btn,
.rsvp-ticket-link,
.rsvp-whatsapp-link,
.gift-copy-btn {
    -webkit-tap-highlight-color: transparent;
    box-shadow: none;
}

.app-modal .btn-primary,
.btn-modal-map,
.gift-store-link,
.sales-plan-btn,
.rsvp-ticket-link {
    min-height: 42px;
    border: 1px solid var(--template-primary, var(--primary));
    border-radius: 999px;
    background: var(--template-primary, var(--primary));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-modal .btn-secondary,
.gift-copy-btn {
    min-height: 38px;
    border: 1px solid color-mix(in srgb, var(--template-primary, var(--primary)) 34%, transparent);
    border-radius: 999px;
    background: transparent;
    color: var(--template-primary, var(--primary));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rsvp-whatsapp-link {
    min-height: 42px;
    border: 1px solid #22c55e;
    border-radius: 999px;
    background: #22c55e;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 850;
}


/* =========================================================
   04 — Iconos globales
========================================================= */

.app-modal .em-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--template-primary, var(--primary));
}

.app-modal .em-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modal-location-icon,
.modal-schedule-icon,
.gift-icon,
.dresscode-icon,
.modal-contact-icon,
.sales-plan-icon {
    display: grid;
    place-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.modal-location-icon .em-icon,
.modal-schedule-icon .em-icon,
.gift-icon .em-icon,
.dresscode-icon .em-icon {
    width: 34px;
    height: 34px;
}


/* =========================================================
   05 — Tarjetas base
========================================================= */

.modal-location-card,
.modal-schedule-card,
.gift-card,
.dresscode-card,
.modal-contact-card,
.sales-plan-card,
.rsvp-guest-summary div {
    border: 1px solid rgba(120, 90, 70, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: none;
}

.modal-location-card,
.modal-schedule-card,
.gift-card {
    padding: 15px 16px;
}

.modal-location-content span,
.modal-schedule-content span,
.gift-card span,
.dresscode-card span,
.modal-contact-card span,
.sales-plan-card span,
.rsvp-guest-summary span {
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.modal-location-content h3,
.modal-schedule-content h3,
.gift-card h3,
.dresscode-card h3,
.modal-contact-card h3,
.sales-plan-card h3 {
    color: var(--text);
    letter-spacing: -0.035em;
}

.modal-location-content p,
.modal-schedule-content p,
.gift-card p,
.modal-contact-card p,
.sales-plan-card li {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.38;
}


/* =========================================================
   06 — RSVP
========================================================= */

.rsvp-form {
    display: grid;
    gap: 16px;
}

.rsvp-form label {
    display: grid;
    gap: 8px;
    color: #4f4541;
    font-weight: 800;
}

.rsvp-form input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(120, 90, 70, 0.14);
    border-radius: 16px;
    background: #fff;
    font: inherit;
}

.rsvp-form small {
    color: var(--muted);
    font-weight: 500;
}

.rsvp-guest-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 18px 0 16px;
}

.rsvp-guest-summary div {
    padding: 15px 16px;
    border: 1px solid rgba(120, 90, 70, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    text-align: left;
}

.rsvp-guest-summary div:first-child {
    grid-column: 1 / -1;
}

.rsvp-guest-summary span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rsvp-guest-summary strong {
    display: block;
    color: var(--text);
    font-size: 1.22rem;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.rsvp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 10px;
}

.rsvp-actions .btn {
    width: 100%;
    min-height: 42px;
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: none;
}

.rsvp-message {
    margin-top: 18px;
    padding: 20px 16px;
    border-radius: 18px;
    font-weight: 800;
    text-align: center;
}

.rsvp-message-neutral {
    background: #f1ebe8;
    color: #5c4f4b;
}

.rsvp-message-success {
    background: #d6fbef;
    color: #067757;
}

.rsvp-message-error {
    background: #ffe3e8;
    color: #8f1f2e;
}

.rsvp-ticket-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.rsvp-ticket-link,
.rsvp-whatsapp-link {
    width: 100%;
    text-transform: none;
    letter-spacing: 0;
}

@media (max-width: 360px) {
    .rsvp-actions,
    .rsvp-ticket-actions {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   07 — Ubicación / Editorial
========================================================= */

.modal-location-list {
    display: grid;
    gap: 0;
    margin-top: 4px;
}

.modal-location-card {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    padding: 18px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.modal-location-card + .modal-location-card {
    border-top: 1px solid rgba(120, 90, 70, 0.14);
}

.modal-location-icon {
    width: 32px;
    height: 32px;
    margin-top: 2px;
}

.modal-location-icon .em-icon {
    width: 26px;
    height: 26px;
}

.modal-location-content span {
    display: block;
    margin-bottom: 5px;
    font-size: 0.66rem;
    letter-spacing: 0.14em;
}

.modal-location-content h3 {
    margin: 0 0 6px;
    font-size: 1.32rem;
    line-height: 1.12;
}

.modal-location-content p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.btn-modal-map {
    width: auto;
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--template-primary, var(--primary));
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.btn-modal-map::after {
    content: " →";
}

.modal-location-content h3 {
    font-size: 1.38rem;
    font-weight: 850;
}

.modal-location-content p {
    margin-bottom: 6px;
}

.btn-modal-map .em-icon {
    display: none;
}

.btn-modal-map {
    margin-top: 2px;
    font-size: 0.68rem;
    letter-spacing: 0.11em;
}


/* =========================================================
   08 — Regalos
========================================================= */
/*
.gifts-list {
    display: grid;
    gap: 14px;
}

.gift-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: start;
    padding: 16px;
    border: 1px solid rgba(120, 90, 70, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
}

.gift-icon {
    width: 42px;
    height: 42px;
}

.gift-icon .em-icon {
    width: 30px;
    height: 30px;
}

.gift-card h3 {
    margin: 0 0 6px;
    font-size: 1.22rem;
    line-height: 1.15;
}

.gift-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.38;
}

.gift-bank-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.gift-bank-actions .gift-copy-btn {
    width: 100%;
    min-width: 0;
    padding: 8px 4px;
    font-size: 0.6rem;
    line-height: 1;
    white-space: nowrap;
}
*/
/* Mesas de regalo como cápsulas */
/*
.gift-store-pill {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-top: 1px solid rgba(120, 90, 70, 0.14);
}

.gift-store-pill-logo {
    display: flex;
    align-items: center;
    min-width: 0;
}

.gift-store-pill-logo img {
    max-width: 132px;
    max-height: 42px;
    object-fit: contain;
    display: block;
}

.gift-store-pill-info {
    text-align: right;
    display: grid;
    gap: 4px;
}

.gift-store-pill-info span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.gift-store-pill-info a {
    color: var(--template-primary, var(--primary));
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gift-bank-actions::after {
    content: "Toca para copiar";
    grid-column: 1 / -1;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.02em;
}
*/

/* =========================================================
   09 — Vestimenta
========================================================= */

.dresscode-card {
    padding: 18px;
    text-align: center;
}

.dresscode-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 10px;
}

.dresscode-card span {
    display: block;
    margin-bottom: 4px;
    font-size: .68rem;
    letter-spacing: .12em;
}

.dresscode-card h3 {
    margin: 0 0 14px;
    font-size: 1.7rem;
    line-height: 1.1;
}

.dresscode-info,
.dresscode-note {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    text-align: left;
}

.dresscode-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;

    padding: 10px 14px;

    background: transparent;
    border: 0;
    border-top: 1px solid rgba(120,90,70,.08);
    border-radius: 0;
}

.dresscode-info strong {
    margin: 0;
    white-space: nowrap;
    color: var(--primary);
    font-size: .82rem;
}

.dresscode-info p {
    margin: 0;
    font-size: .92rem;
    text-align: right;
}

.dresscode-note {
    background: transparent;
    border-top: 1px solid rgba(120,90,70,.08);
    border-radius: 0;
    padding: 12px 0 0;
    margin-top: 12px;
    color: #8f837e;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
}

/* =========================================================
   10 — Agenda / Cronograma
========================================================= */

.modal-schedule-list {
    display: grid;
    gap: 0;
    margin-top: 4px;
}

.modal-schedule-card {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    padding: 16px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.modal-schedule-card + .modal-schedule-divider + .modal-schedule-card {
    border-top: 1px solid rgba(120, 90, 70, 0.14);
}

.modal-schedule-icon {
    width: 32px;
    height: 32px;
    margin-top: 2px;
}

.modal-schedule-icon .em-icon {
    width: 26px;
    height: 26px;
}

.modal-schedule-content span {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.modal-schedule-content h3 {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 1.28rem;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.modal-schedule-content strong {
    display: block;
    margin-bottom: 5px;
    color: var(--template-primary, var(--primary));
    font-size: 0.92rem;
    font-weight: 800;
}

.modal-schedule-content p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.modal-schedule-divider {
    display: none;
}


/* =========================================================
   11 — Contacto
========================================================= */

.modal-contact-card {
    padding: 18px 0 4px;
    border: 0;
    border-top: 1px solid rgba(120, 90, 70, 0.14);
    border-radius: 0;
    background: transparent;
    text-align: center;
}

.modal-contact-icon {
    display: none;
}

.modal-contact-card span {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-dark);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.modal-contact-card h3 {
    margin: 0 0 10px;
    font-size: 1.55rem;
    line-height: 1.1;
}

.modal-contact-card p {
    max-width: 290px;
    margin: 0 auto 16px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.modal-contact-card .btn-modal-map {
    width: auto;
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--template-primary, var(--primary));
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.modal-contact-card .btn-modal-map::after {
    content: " →";
}


/* =========================================================
   12 — Planes
========================================================= */

.sales-plans {
    display: grid;
    gap: 14px;
}

.sales-plan-card {
    position: relative;
    padding: 18px 20px;
}

.sales-plan-featured {
    border-color: var(--template-primary, var(--primary));
    box-shadow: 0 18px 40px rgba(200, 50, 69, 0.12);
}

.sales-plan-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(200, 50, 69, 0.10);
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 900;
}

.sales-plan-icon {
    display: none;
}

.sales-plan-card span {
    display: block;
    margin-bottom: 6px;
}

.sales-plan-card h3 {
    margin: 0 0 8px;
    font-size: 1.42rem;
    line-height: 1.1;
}

.sales-plan-lead {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.sales-plan-card ul {
    display: grid;
    gap: 7px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.sales-plan-card li {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
}

.sales-plan-card li::before {
    content: "✓";
    margin-right: 8px;
    color: var(--template-primary, var(--primary));
    font-weight: 900;
}

.sales-plan-btn {
    width: 100%;
}

.sales-pro-note {
    padding: 16px 4px 4px;
    border-top: 1px solid rgba(120, 90, 70, 0.14);
    text-align: center;
}

.sales-pro-note strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.25;
}

.sales-pro-note p {
    max-width: 310px;
    margin: 0 auto 10px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.4;
}

.sales-pro-note a {
    color: var(--template-primary, var(--primary));
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sales-plan-kicker {
    margin: 0 0 10px;
    color: var(--template-primary, var(--primary));
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sales-plan-description {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.sales-plan-close {
    margin: 2px 0 16px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(200, 50, 69, 0.08);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 900;
}


/* =========================================================
   13 — Responsive
========================================================= */

@media (min-width: 700px) {
    .app-modal-panel {
        top: 50%;
        bottom: auto;
        border-radius: 28px;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 520px) {
    .app-modal-panel {
        max-height: calc(100vh - 24px);
    }
}

@media (max-width: 380px) {
    .app-modal-panel {
        padding-inline: 18px;
    }
}