/* =========================================================
   Pop-up "Entrega de kits"
   ---------------------------------------------------------
   Estética alineada con la sección de entrega de la home
   (website/entrega_kits.html): encabezado del tema
   (main-heading + heading-separator), tarjetas con bloque de
   fecha, esquinas de 4px y sombras sutiles.
   Los colores salen de las clases del tema (main-bg /
   main-color) y de --color-primario / --color-secundario
   (LandingConfig, theme_vars.html).
   ========================================================= */

.mkp-overlay,
.mkp-modal {
    --mkp-primary: var(--color-primario, var(--primary-color, #00a4d9));
    --mkp-accent: var(--color-secundario, var(--secondary-color, var(--mkp-primary)));
    --mkp-muted: #777777;
    --mkp-border: #e6e6e6;
    --mkp-overlay-bg: rgba(0, 0, 0, 0.6);
    --mkp-z: var(--modal-z-index, 99999);
}

/* -----------------------------------------
   Overlay
   ----------------------------------------- */
.mkp-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: var(--mkp-z);
    background: var(--mkp-overlay-bg);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.mkp-overlay.is-visible {
    opacity: 1;
}

/* -----------------------------------------
   Caja del modal
   ----------------------------------------- */
.mkp-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: calc(var(--mkp-z) + 1);
    box-sizing: border-box;
    width: 92%;
    max-width: 600px;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 34px 28px 26px;
    background: #ffffff;
    color: inherit;
    font-family: inherit;
    border-radius: 4px;
    border-top: 5px solid var(--mkp-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, -47%);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mkp-modal.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%);
}

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

/* -----------------------------------------
   Cierre ("X")
   ----------------------------------------- */
.mkp-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--mkp-muted);
    font-family: inherit;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.mkp-close:hover,
.mkp-close:focus-visible {
    background: #f2f2f2;
    color: var(--mkp-primary);
    outline: none;
}

/* -----------------------------------------
   Encabezado (simple: sin separador, para no repetir el de la home)
   ----------------------------------------- */
.mkp-modal__header {
    margin-bottom: 18px;
    padding: 0 30px;
    text-align: center;
}

.mkp-modal__eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--mkp-muted);
}

.mkp-modal__title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
}

.mkp-modal__desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

/* -----------------------------------------
   Aviso "inscripción online finalizada"
   ----------------------------------------- */
.mkp-aviso {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 4px;
    border-left: 4px solid var(--mkp-accent);
    background: #f7f7f7;
}

.mkp-aviso__icon {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1.1;
    color: var(--mkp-accent);
}

.mkp-aviso p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.mkp-aviso strong {
    font-weight: 800;
}

/* -----------------------------------------
   Tarjetas de lugares (mismo diseño que la sección)
   ----------------------------------------- */
.mkp-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mkp-item {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--mkp-border);
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.mkp-item__fecha {
    flex: 0 0 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    text-align: center;
}

.mkp-item__fecha,
.mkp-item__fecha span {
    color: #fff !important;
}

.mkp-item__dia {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0.9;
}

.mkp-item__numero {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
}

.mkp-item__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 14px;
}

.mkp-item__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.mkp-item__dato {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.4;
}

.mkp-item__dato .fa {
    width: 14px;
    text-align: center;
    color: var(--mkp-primary);
}

.mkp-item__horario {
    font-weight: 700;
}

/* -----------------------------------------
   DNI (bloque de color sólido)
   ----------------------------------------- */
.mkp-dni {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin: 18px 0 0;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

.mkp-dni,
.mkp-dni i {
    color: #fff !important;
}

/* -----------------------------------------
   Pie / botón
   ----------------------------------------- */
.mkp-modal__footer {
    margin-top: 18px;
    text-align: center;
}

/* Sirve tanto para <button> como para <a> */
.mkp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    border: 2px solid var(--mkp-primary);
    border-radius: 4px;
    background: var(--mkp-primary);
    color: #fff !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.mkp-btn:hover,
.mkp-btn:focus,
.mkp-btn:focus-visible {
    opacity: 0.88;
    text-decoration: none;
    outline: none;
}

/* -----------------------------------------
   Variante post-evento ("¡Gracias por participar!")
   ----------------------------------------- */
.mkp-modal--gracias {
    max-width: 460px;
}

.mkp-modal--gracias .mkp-modal__header {
    margin-bottom: 14px;
}

/* -----------------------------------------
   Responsive
   ----------------------------------------- */
@media (min-width: 720px) {
    .mkp-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mkp-btn {
        width: auto;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .mkp-modal {
        padding: 30px 18px 20px;
    }

    .mkp-modal__header {
        padding: 0 24px;
    }

    .mkp-modal__title {
        font-size: 20px;
    }

    .mkp-item__fecha {
        flex-basis: 84px;
    }

    .mkp-dni {
        font-size: 13px;
    }
}

/* Respeta "reducir movimiento" */
@media (prefers-reduced-motion: reduce) {
    .mkp-overlay,
    .mkp-modal,
    .mkp-close,
    .mkp-btn {
        transition: none !important;
    }
}
