/**
 * Modal de sesión (mismo layout que la agenda).
 * Incluido en /pages/speakers.html; la agenda sigue con estilos en página.
 */

.speaker-card--expandable {
    cursor: pointer;
}

.speaker-card--expandable:focus-visible {
    outline: 2px solid rgba(103, 212, 255, 0.85);
    outline-offset: 3px;
}

.schedule-session-modal-dialog {
    max-height: calc(100vh - 1.5rem);
    margin: 0.75rem auto;
}

.schedule-session-modal-dialog .modal-content {
    max-height: calc(100vh - 1.5rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.schedule-session-modal-dialog .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.schedule-session-modal-dialog .modal-body > .schedule-modal-row {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    align-items: stretch;
}

.schedule-modal-row {
    min-height: 0;
}

#scheduleSessionModal .min-h-0 {
    min-height: 0;
}

.schedule-modal-content {
    position: relative;
    background: rgba(23, 27, 50, 0.99);
    border-color: rgba(160, 196, 255, 0.28) !important;
    border-radius: 18px;
    overflow: hidden;
}

/* Fallback: DEV #7C3DFF · BUS #FF3DA8 · ARCH #3DFFC0 (dotnet / singularity / gsas) */
:root {
    --tag-accent-dotnet-rgb: 124, 61, 255;
    --tag-accent-singularity-rgb: 255, 61, 168;
    --tag-accent-gsas-rgb: 61, 255, 192;
}

/* Brillo y tinte muy suave por track / etiqueta (clases las pone initScheduleSessionModal) */
.schedule-modal-content.schedule-modal-content--accent-dotnet::before,
.schedule-modal-content.schedule-modal-content--accent-singularity::before,
.schedule-modal-content.schedule-modal-content--accent-gsas::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

.schedule-modal-content.schedule-modal-content--accent-dotnet::before {
    background: linear-gradient(
        125deg,
        rgba(var(--tag-accent-dotnet-rgb), 0.2) 0%,
        rgba(var(--tag-accent-dotnet-rgb), 0.04) 38%,
        transparent 58%
    );
}

.schedule-modal-content.schedule-modal-content--accent-singularity::before {
    background: linear-gradient(
        125deg,
        rgba(var(--tag-accent-singularity-rgb), 0.18) 0%,
        rgba(var(--tag-accent-singularity-rgb), 0.04) 38%,
        transparent 58%
    );
}

.schedule-modal-content.schedule-modal-content--accent-gsas::before {
    background: linear-gradient(
        125deg,
        rgba(var(--tag-accent-gsas-rgb), 0.16) 0%,
        rgba(var(--tag-accent-gsas-rgb), 0.04) 38%,
        transparent 58%
    );
}

.schedule-modal-content.schedule-modal-content--accent-dotnet {
    border-color: rgba(var(--tag-accent-dotnet-rgb), 0.42) !important;
    box-shadow:
        0 18px 56px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(var(--tag-accent-dotnet-rgb), 0.12),
        0 0 60px rgba(var(--tag-accent-dotnet-rgb), 0.1);
}

.schedule-modal-content.schedule-modal-content--accent-singularity {
    border-color: rgba(var(--tag-accent-singularity-rgb), 0.4) !important;
    box-shadow:
        0 18px 56px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(var(--tag-accent-singularity-rgb), 0.12),
        0 0 60px rgba(var(--tag-accent-singularity-rgb), 0.1);
}

.schedule-modal-content.schedule-modal-content--accent-gsas {
    border-color: rgba(var(--tag-accent-gsas-rgb), 0.38) !important;
    box-shadow:
        0 18px 56px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(var(--tag-accent-gsas-rgb), 0.12),
        0 0 60px rgba(var(--tag-accent-gsas-rgb), 0.1);
}

.schedule-modal-content > .modal-header,
.schedule-modal-content > .modal-body {
    position: relative;
    z-index: 1;
}

.schedule-modal-aside {
    padding: 1.1rem 0.8rem 1.25rem 1.1rem;
    justify-content: flex-start;
    align-items: center;
    align-self: stretch;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    overflow-x: clip;
    overflow-y: visible;
}

@media (min-width: 768px) {
    .schedule-modal-aside {
        align-items: center;
    }

    .schedule-modal-aside.schedule-modal-aside--two-speakers {
        align-items: stretch;
    }
}

.schedule-modal-aside-speaker {
    width: 100%;
    max-width: 268px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.schedule-modal-aside-speaker + .schedule-modal-aside-speaker {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(160, 196, 255, 0.12);
}

.schedule-modal-speaker-block-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
}

.schedule-modal-aside-link--photo-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    margin-top: 0;
    align-self: auto;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.schedule-modal-aside-link--photo-corner i {
    font-size: 1.05rem;
}

.schedule-modal-aside-link--photo-corner:hover {
    transform: scale(1.06);
}

/* Metadatos de sesión: una línea bajo el título (columna principal) */
.schedule-modal-session-meta--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0;
    margin: 0.1rem 0 0.75rem;
    padding: 0.5rem 0 0.15rem;
    border: none;
    border-radius: 0;
    border-top: 1px solid rgba(160, 196, 255, 0.14);
    background: transparent;
    box-shadow: none;
}

.schedule-modal-session-meta--inline .schedule-modal-session-inline__item {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0 0.65rem;
    border-left: 1px solid rgba(160, 196, 255, 0.18);
    max-width: 100%;
}

.schedule-modal-session-meta--inline .schedule-modal-session-inline__item:first-child {
    border-left: none;
    padding-left: 0;
}

.schedule-modal-session-inline__k {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(158, 199, 255, 0.72);
    flex-shrink: 0;
}

.schedule-modal-session-inline__v {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.35;
    color: rgba(244, 247, 255, 0.94);
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.schedule-modal-session-inline__v--empty {
    color: rgba(158, 199, 255, 0.42);
    font-weight: 400;
}

@media (min-width: 768px) {
    .schedule-modal-aside--two-speakers {
        align-content: flex-start;
        gap: 0 !important;
    }

    .schedule-modal-aside--two-speakers .schedule-modal-aside-speaker {
        flex: 0 0 auto;
        flex-direction: row;
        align-items: flex-start;
        gap: 0.9rem;
        max-width: 100%;
        width: 100%;
        min-width: 0;
    }

    .schedule-modal-aside--two-speakers .schedule-modal-aside-speaker + .schedule-modal-aside-speaker {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(160, 196, 255, 0.12);
    }

    .schedule-modal-aside--two-speakers .schedule-modal-speaker-block {
        flex: 0 0 auto;
        width: 112px;
        max-width: 112px;
        margin: 0;
        border-radius: 12px;
    }

    .schedule-modal-aside--two-speakers .schedule-modal-aside-meta {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        text-align: left;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .schedule-modal-aside--two-speakers .schedule-modal-aside-name {
        margin-bottom: 0.05rem;
    }

    .schedule-modal-aside--two-speakers .schedule-modal-aside-position {
        text-align: left;
    }

    .schedule-modal-aside--two-speakers .schedule-modal-aside-link {
        align-self: flex-start;
        width: 34px;
        height: 34px;
        margin-top: 0.2rem;
    }

    .schedule-modal-aside--two-speakers .schedule-modal-aside-link i {
        font-size: 1rem;
    }
}

.schedule-modal-aside-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    text-align: center;
    align-items: center;
}

.schedule-modal-aside-name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--accent-soft);
    letter-spacing: 0.02em;
}

.schedule-modal-aside-position {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(244, 247, 255, 0.82);
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.schedule-modal-aside-company {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    line-height: 1.4;
}

.schedule-modal-aside-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 38px;
    height: 38px;
    margin-top: 0.35rem;
    background: #0a66c2;
    color: #fff !important;
    font-size: 1.05rem;
    line-height: 1;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.schedule-modal-aside-link i {
    font-size: 1.15rem;
}

.schedule-modal-aside-link:hover {
    background: #004182;
    color: #fff !important;
}

.schedule-modal-aside-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

.schedule-modal-speaker-block {
    width: 100%;
    max-width: 252px;
    margin: 0 auto;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    background-color: #1b1f3a;
    background-image: url('../speakers/images/backgrounds-01%202.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

@media (min-width: 768px) {
    .schedule-modal-speaker-block {
        margin: 0 auto;
    }
}

.schedule-modal-speaker-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0;
    border: none;
    display: block;
    box-shadow: none;
    background: transparent;
}

.schedule-modal-main {
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

#scheduleSessionModal .schedule-modal-row > [class*='col-'] {
    min-width: 0;
}

.schedule-modal-main.schedule-modal-main--with-aside {
    border-left: 1px solid rgba(160, 196, 255, 0.12);
}

/* Especificidad vs. estilos inline en pages/schedule.html */
#scheduleSessionModal .schedule-modal-desc-scroll {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    padding-top: 0.35rem;
    padding-right: 10px;
    margin-right: 2px;
    scrollbar-color: rgba(103, 212, 255, 0.28) rgba(0, 0, 0, 0.14);
    scrollbar-width: thin;
}

#scheduleSessionModal .schedule-modal-desc-scroll::-webkit-scrollbar {
    width: 5px;
}

#scheduleSessionModal .schedule-modal-desc-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 8px;
}

#scheduleSessionModal .schedule-modal-desc-scroll::-webkit-scrollbar-thumb {
    background: rgba(103, 212, 255, 0.22);
    border-radius: 8px;
}

#scheduleSessionModal .schedule-modal-desc-scroll:hover::-webkit-scrollbar-thumb {
    background: rgba(103, 212, 255, 0.38);
}

/* Escritorio: altura acotada para que el texto largo siempre active scroll (flex + max-height) */
@media (min-width: 768px) {
    #scheduleSessionModal .schedule-modal-desc-scroll {
        flex: 1 1 0%;
        min-height: 0;
        max-height: min(62vh, calc(100vh - 13.5rem));
    }
}

.schedule-modal-session-title {
    line-height: 1.3;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    margin-bottom: 0.35rem !important;
}

.schedule-modal-main-head {
    flex-shrink: 0;
    min-width: 0;
    width: 100%;
    padding-bottom: 0.15rem;
}

/* Caja vertical (solo si en el futuro se reutiliza el bloque dl fuera de la fila inline) */
.schedule-modal-session-meta:not(.schedule-modal-session-meta--inline) {
    margin-top: 0.4rem;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.9rem 0.72rem;
    border-radius: 12px;
    border: 1px solid rgba(160, 196, 255, 0.16);
    background: rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.schedule-modal-session-meta.d-none {
    display: none !important;
}

.schedule-modal-session-meta__list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.schedule-modal-session-meta__pair {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    column-gap: 0.85rem;
    align-items: start;
}

@media (min-width: 480px) {
    .schedule-modal-session-meta__pair {
        grid-template-columns: 5.5rem minmax(0, 1fr);
    }
}

.schedule-modal-session-meta__term {
    margin: 0;
    padding-top: 0.12rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(158, 199, 255, 0.78);
    line-height: 1.35;
}

.schedule-modal-session-meta__def {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(244, 247, 255, 0.94);
    word-break: break-word;
}

/* Pastilla tipo agenda / temática */
.schedule-modal-session-meta__def--tag {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    margin-top: 0.05rem;
    padding: 0.28rem 0.65rem 0.32rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.96);
    vertical-align: middle;
}

/* Franja inferior "More info" (speakers con sesión en agenda) */
#speakers-list .speaker-card--expandable,
#speakers-list-preview .speaker-card--expandable {
    --speaker-strip-rgb: 32, 36, 48;
}

.speaker-card-more-info {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 16px 11px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    border: none;
    border-radius: 0 0 24px 24px;
    border-bottom: 3px solid rgba(var(--speaker-strip-rgb), 0.52);
    background: rgba(var(--speaker-strip-rgb), 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
    transition: background 0.2s ease, border-bottom-color 0.2s ease, color 0.15s ease;
    -webkit-font-smoothing: antialiased;
}

.speaker-card-more-info:hover {
    background: rgba(var(--speaker-strip-rgb), 0.52);
    border-bottom-color: rgba(var(--speaker-strip-rgb), 0.78);
    color: #fff;
}

.speaker-card-more-info:focus-visible {
    outline: 2px solid rgba(103, 212, 255, 0.85);
    outline-offset: 2px;
}

.schedule-modal-desc {
    white-space: normal;
    color: var(--text-secondary);
}

.schedule-modal-desc__para {
    margin: 0 0 0.85rem;
    line-height: 1.65;
    white-space: normal;
}

.schedule-modal-desc__para:last-child {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    /* Centrado estable del overlay en móvil (modal-xl + centered) */
    #scheduleSessionModal.modal.show {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.75rem;
    }

    #scheduleSessionModal .schedule-session-modal-dialog {
        margin: 0 !important;
        width: 100%;
        max-width: min(1140px, 100%);
    }

    .schedule-session-modal-dialog .modal-body > .schedule-modal-row {
        min-height: 0;
        flex: 1 1 auto;
    }

    .schedule-modal-aside {
        display: none !important;
    }

    .schedule-modal-main {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
        min-height: 0;
        overflow: hidden;
    }

    .schedule-modal-main.schedule-modal-main--with-aside {
        border-left: none;
    }

    #scheduleSessionModal .schedule-modal-desc-scroll {
        flex: 1 1 0%;
        min-height: 0;
        max-height: min(58vh, calc(100vh - 11.5rem));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
