/* ==========================================================================
   BS-MODAL - Estilos personalizados para modales Bootstrap 5 reutilizables
   Complementa Bootstrap, no lo reemplaza. Se carga condicionalmente desde XSL.
   ========================================================================== */

/* ----------------------------------------------------------------------------
   Estilos base (desktop-first, aplica a todos los breakpoints)
   ---------------------------------------------------------------------------- */

/* Dialogo: ancho maximo con tope para pantallas ultrawide */
.bs-modal .modal-dialog {
    max-width: min(70vw, 1100px);
}
.bs-modal .modal-content {
    border: none;
    border-radius: 2px;
    background-color: white;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* --- Header --- */

.bs-modal .modal-header {
    padding: 40px 48px 8px 48px;
    border-bottom: none;
}
.bs-modal .modal-header .modal-title {
    font-family: "Playfair Display";
    font-size: 2rem;
    color: #00181a;
    font-weight: 400;
    line-height: 2.5rem;
    text-transform: uppercase;
    text-wrap: balance;
}

/* Boton close: estilo minimalista alineado con el proyecto */
.bs-modal .modal-header .btn-close {
    width: 20px;
    height: 20px;
    padding: 6px;
    box-sizing: content-box;
    opacity: 1;
    border-radius: 2px;
    background-color: #2A2A2A;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    transition: opacity 0.3s ease;
}
.bs-modal .modal-header .btn-close:hover {
    opacity: 0.7;
}
.bs-modal .modal-header .btn-close:focus {
    box-shadow: none;
    outline: none;
}

/* --- Body --- */

.bs-modal .modal-body {
    padding: 24px 48px 48px 48px;
    max-height: calc(85vh - 120px);
    overflow-y: auto;

    /* Scrollbar personalizada — Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgb(42 42 42 / 27%) transparent;
}

/* Scrollbar personalizada — Chrome/Safari/Edge */
.bs-modal .modal-body::-webkit-scrollbar {
    width: 4px;
}
.bs-modal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.bs-modal .modal-body::-webkit-scrollbar-thumb {
    min-height: 40px;
    background: rgb(42 42 42 / 50%);
    border-radius: 10px;
}
.bs-modal .modal-body::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}
.bs-modal .modal-body::-webkit-scrollbar-corner {
    background: transparent;
}

/* Tipografia del contenido CMS dentro del body */
.bs-modal .modal-body p {
    margin: 0 0 16px 0;
    font-family: "Inter";
    font-size: 1rem;
    color: #00181a;
    font-weight: 400;
    line-height: 1.5rem;
}
.bs-modal .modal-body p:last-child {
    margin-bottom: 0;
}

/* Horario del evento (debajo del titulo, antes del contenido) */
.bs-modal .modal-body .event-time {
    margin: 0 0 20px 0;
    font-family: "Inter";
    font-size: 0.875rem;
    color: #00A8B5;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Enlaces dentro del contenido del modal */
.bs-modal .modal-body a {
    color: #00A8B5;
    text-decoration: underline;
    transition: color 0.3s ease;
}
.bs-modal .modal-body a:hover {
    color: #00181a;
}

/* Listas dentro del contenido CMS */
.bs-modal .modal-body ul,
.bs-modal .modal-body ol {
    padding-left: 20px;
    margin: 0 0 16px 0;
}
.bs-modal .modal-body li {
    font-family: "Inter";
    font-size: 1rem;
    color: #00181a;
    font-weight: 400;
    line-height: 1.5rem;
    margin-bottom: 8px;
}
.bs-modal .modal-body li:last-child {
    margin-bottom: 0;
}

/* Encabezados dentro del contenido CMS — escala descendente desde el titulo del modal */
.bs-modal .modal-body h2,
.bs-modal .modal-body h3,
.bs-modal .modal-body h4,
.bs-modal .modal-body h5,
.bs-modal .modal-body h6 {
    margin: 0 0 16px 0;
    font-family: "Playfair Display";
    color: #00181a;
    font-weight: 400;
    text-transform: uppercase;
}
.bs-modal .modal-body h2 { font-size: 1.625rem; line-height: 2.125rem; }
.bs-modal .modal-body h3 { font-size: 1.4375rem; line-height: 1.875rem; }
.bs-modal .modal-body h4 { font-size: 1.25rem; line-height: 1.625rem; }
.bs-modal .modal-body h5 { font-size: 1.125rem; line-height: 1.5rem; }
.bs-modal .modal-body h6 { font-size: 1rem; line-height: 1.375rem; }

/* --- Footer (opcional, si el template lo incluye) --- */

.bs-modal .modal-footer {
    padding: 0 48px 40px 48px;
    border-top: none;
}

/* ----------------------------------------------------------------------------
   Desktop (992px - 1920px)
   ---------------------------------------------------------------------------- */

@media (min-width: 992px) and (max-width: 1920px) {
    .bs-modal .modal-dialog {
        max-width: min(70vw, 1000px);
    }
    .bs-modal .modal-header {
        padding: 32px 40px 8px 40px;
    }
    .bs-modal .modal-header .modal-title {
        font-size: 1.875rem;
        line-height: 2.375rem;
    }
    .bs-modal .modal-body h2 { font-size: 1.5rem; line-height: 2rem; }
    .bs-modal .modal-body h3 { font-size: 1.3125rem; line-height: 1.75rem; }
    .bs-modal .modal-body h4 { font-size: 1.1875rem; line-height: 1.5rem; }
    .bs-modal .modal-body h5 { font-size: 1.0625rem; line-height: 1.375rem; }
    .bs-modal .modal-body h6 { font-size: 0.9375rem; line-height: 1.25rem; }
    .bs-modal .modal-body {
        padding: 20px 40px 40px 40px;
        max-height: calc(85vh - 100px);
    }
    .bs-modal .modal-footer {
        padding: 0 40px 32px 40px;
    }
}

/* ----------------------------------------------------------------------------
   Desktop Grande (>1920px)
   Los estilos base ya cubren este rango correctamente
   ---------------------------------------------------------------------------- */

/* ----------------------------------------------------------------------------
   Tablet y Movil (<992px)
   ---------------------------------------------------------------------------- */

@media (max-width: 991px) {
    .bs-modal .modal-dialog {
        max-width: 90%;
        margin: 24px auto;
    }
    .bs-modal .modal-header {
        padding: 24px 24px 8px 24px;
    }
    .bs-modal .modal-header .modal-title {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    .bs-modal .modal-body {
        padding: 16px 24px 24px 24px;
        max-height: calc(85vh - 80px);
    }
    .bs-modal .modal-body p {
        font-size: 0.9375rem;
        line-height: 1.375rem;
    }
    .bs-modal .modal-body li {
        font-size: 0.9375rem;
        line-height: 1.375rem;
    }
    .bs-modal .modal-body h2 { font-size: 1.25rem; line-height: 1.625rem; }
    .bs-modal .modal-body h3 { font-size: 1.125rem; line-height: 1.5rem; }
    .bs-modal .modal-body h4 { font-size: 1rem; line-height: 1.375rem; }
    .bs-modal .modal-body h5 { font-size: 0.9375rem; line-height: 1.25rem; }
    .bs-modal .modal-body h6 { font-size: 0.875rem; line-height: 1.125rem; }
    .bs-modal .modal-footer {
        padding: 0 24px 24px 24px;
    }
}

/* Movil pequeno: modal a pantalla completa */
@media (max-width: 576px) {
    .bs-modal .modal-dialog {
        max-width: 100%;
        margin: 0;
        min-height: 100dvh;
    }
    .bs-modal .modal-content {
        min-height: 100dvh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    .bs-modal .modal-body {
        max-height: none;
        flex: 1 1 auto;
        overflow-y: auto;
    }
    .bs-modal .modal-header .modal-title {
        font-size: 1.375rem;
        line-height: 1.75rem;
    }
    .bs-modal .modal-body p {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }
    .bs-modal .modal-body li {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }
}
