/* =========================================================
   JaimeDiaz.TV · Evento individual
   ========================================================= */

.jd-live-page {
    --jd-live-side-width: 320px;
    --jd-live-layout-gap: 24px;

    width: min(100% - 40px, 1180px);
    margin: 34px auto 110px;

    color: #182238;
}


/* =========================================================
   Cabecera
   ========================================================= */

.jd-live-hero {
    position: relative;
    overflow: hidden;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    align-items: center;
    gap: 28px;

    width: 100%;
    padding: 30px 36px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;

    color: #ffffff;
    background:
        radial-gradient(
            circle at 88% 20%,
            rgba(244, 115, 33, 0.22),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #10192b 0%,
            #17233c 58%,
            #233a61 100%
        );

    box-shadow: 0 24px 55px rgba(16, 25, 43, 0.16);
}

.jd-live-hero::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );
    background-size: 48px 48px;
    mask-image: linear-gradient(
        90deg,
        transparent,
        rgba(0, 0, 0, 0.52),
        transparent
    );
}

.jd-live-hero__content,
.jd-live-hero__signal {
    position: relative;
    z-index: 1;
}

.jd-live-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 20px;

    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;

    transition:
        color 160ms ease,
        transform 160ms ease;
}

.jd-live-back:hover {
    color: #ffffff;
    transform: translateX(-3px);
}

.jd-live-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    width: max-content;
    margin-bottom: 10px;

    color: #ff934f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.jd-live-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #f47321;
    box-shadow: 0 0 0 6px rgba(244, 115, 33, 0.12);
}

.jd-live-hero h1 {
    width: 100%;
    max-width: none;
    margin: 0;

    color: #ffffff;
    font-size: clamp(31px, 3.5vw, 44px);
    font-weight: 750;
    line-height: 1.02;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.jd-live-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;

    margin-top: 19px;
}

.jd-live-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.jd-live-meta i {
    color: #ff934f;
}

.jd-live-summary {
    max-width: 680px;
    margin: 17px 0 0;

    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.65;
}

.jd-live-hero__signal {
    position: relative;

    display: grid;
    place-items: center;

    width: 128px;
    height: 128px;
    margin-left: auto;
}

.jd-live-hero__ring {
    position: absolute;

    border: 1px solid rgba(244, 115, 33, 0.32);
    border-radius: 50%;
}

.jd-live-hero__ring:nth-child(1) {
    width: 126px;
    height: 126px;
}

.jd-live-hero__ring:nth-child(2) {
    width: 94px;
    height: 94px;
}

.jd-live-hero__ring:nth-child(3) {
    width: 66px;
    height: 66px;
}

.jd-live-hero__mark {
    position: relative;
    z-index: 2;

    display: grid;
    place-items: center;

    width: 54px;
    height: 54px;

    border-radius: 16px;

    color: #ffffff;
    background: #f47321;
    font-size: 17px;
    font-weight: 800;

    box-shadow:
        0 18px 35px rgba(244, 115, 33, 0.26),
        0 0 0 10px rgba(244, 115, 33, 0.08);
}


/* =========================================================
   Distribución principal
   ========================================================= */

.jd-live-shell {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        var(--jd-live-side-width);
    align-items: start;
    gap: var(--jd-live-layout-gap);

    margin-top: 24px;
}

.jd-live-player-card,
.jd-live-access-card,
.jd-live-info-card,
.jd-live-agenda-link {
    border: 1px solid #e5eaf1;
    border-radius: 20px;

    background: #ffffff;
    box-shadow: 0 16px 38px rgba(16, 25, 43, 0.07);
}


/* =========================================================
   Reproductor
   ========================================================= */

.jd-live-player-card {
    min-width: 0;
    overflow: hidden;
}

.jd-live-player {
    position: relative;

    overflow: hidden;
    aspect-ratio: 16 / 9;

    background:
        radial-gradient(
            circle at center,
            rgba(35, 58, 97, 0.65),
            transparent 45%
        ),
        #080f1e;
}

.jd-live-player video {
    display: block;

    width: 100%;
    height: 100%;

    background: #080f1e;
    object-fit: contain;
}

.jd-live-player__badge {
    position: absolute;
    top: 18px;
    left: 18px;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    min-height: 32px;
    padding: 0 12px;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;

    color: #ffffff;
    background: rgba(16, 25, 43, 0.82);
    backdrop-filter: blur(12px);

    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.jd-live-player__badge > span {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #ff624f;
    box-shadow: 0 0 0 5px rgba(255, 98, 79, 0.15);
}

.jd-live-player__viewers {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-left: 4px;
    padding-left: 10px;

    border-left: 1px solid rgba(255, 255, 255, 0.18);

    font-size: 11px;
    font-style: normal;
    letter-spacing: 0;
}

.jd-live-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    padding: 18px 20px;

    border-top: 1px solid #e5eaf1;
    background: #ffffff;
}


/* =========================================================
   Botones
   ========================================================= */

.jd-live-btn,
.jd-live-pin-form button {
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 0 17px;

    border: 1px solid #dfe5ee;
    border-radius: 11px;

    color: #233a61;
    background: #ffffff;

    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;

    transition:
        border-color 160ms ease,
        color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.jd-live-btn:hover,
.jd-live-pin-form button:hover {
    border-color: #cfd8e6;

    color: #10192b;
    background: #f7f9fc;

    transform: translateY(-1px);
}

.jd-live-btn--primary,
.jd-live-pin-form button {
    border-color: #17233c;

    color: #ffffff;
    background: #17233c;
    box-shadow: 0 10px 22px rgba(23, 35, 60, 0.16);
}

.jd-live-btn--primary:hover,
.jd-live-pin-form button:hover {
    border-color: #233a61;

    color: #ffffff;
    background: #233a61;
}


/* =========================================================
   Estados del reproductor
   ========================================================= */

.jd-live-waiting {
    min-height: 490px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 58px;

    text-align: center;
    background:
        radial-gradient(
            circle at center,
            rgba(244, 115, 33, 0.07),
            transparent 34%
        ),
        linear-gradient(180deg, #ffffff, #fbfcfe);
}

.jd-live-waiting__icon,
.jd-live-lock {
    display: grid;
    place-items: center;

    width: 68px;
    height: 68px;
    margin-bottom: 22px;

    border: 1px solid rgba(244, 115, 33, 0.28);
    border-radius: 20px;

    color: #e85d0f;
    background: #fff8ef;

    font-size: 24px;
    box-shadow: 0 14px 28px rgba(244, 115, 33, 0.1);
}

.jd-live-waiting__eyebrow,
.jd-live-access-card__eyebrow {
    margin-bottom: 9px;

    color: #e85d0f;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.jd-live-waiting h2,
.jd-live-access-card h2 {
    max-width: 580px;
    margin: 0;

    color: #17233c;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.08;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.jd-live-waiting p,
.jd-live-access-card > p {
    max-width: 570px;
    margin: 16px auto 0;

    color: #667085;
    font-size: 15px;
    line-height: 1.65;
}

.jd-live-waiting > .jd-live-btn {
    margin-top: 26px;
}

.jd-live-waiting__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;

    margin-top: 26px;
}

.jd-live-waiting__schedule {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-top: 25px;
    padding: 11px 14px;

    border: 1px solid #e5eaf1;
    border-radius: 11px;

    color: #233a61;
    background: #ffffff;

    font-size: 13px;
    font-weight: 750;
}

.jd-live-waiting--interrupted .jd-live-waiting__icon {
    color: #d97706;
    background: #fffbeb;
    border-color: #fde3a7;
}

.jd-live-waiting--failed .jd-live-waiting__icon {
    color: #c2410c;
    background: #fff7ed;
    border-color: #fed7aa;
}

.jd-live-waiting--finished .jd-live-waiting__icon {
    color: #087f5b;
    background: #ecfdf3;
    border-color: #a7f3d0;
}

.jd-live-waiting--expired .jd-live-waiting__icon {
    color: #667085;
    background: #f2f4f7;
    border-color: #dfe3e8;
}

.jd-live-starting {
    position: absolute;
    inset: 0;
    z-index: 3;

    display: grid;
    place-items: center;

    color: rgba(255, 255, 255, 0.82);
    background: #080f1e;

    font-size: 14px;
    font-weight: 750;
}

.jd-live-starting i {
    margin-right: 8px;
}


/* =========================================================
   Acceso privado
   ========================================================= */

.jd-live-access-card {
    min-height: 490px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 52px;

    text-align: center;
}

.jd-live-alert {
    width: min(100%, 520px);

    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-top: 22px;
    padding: 13px 15px;

    border: 1px solid #fecaca;
    border-radius: 11px;

    color: #b42318;
    background: #fff5f5;

    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

.jd-live-pin-form {
    width: min(100%, 520px);
    margin-top: 26px;

    text-align: left;
}

.jd-live-pin-form label {
    display: block;
    margin-bottom: 8px;

    color: #344054;
    font-size: 12px;
    font-weight: 800;
}

.jd-live-pin-form__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.jd-live-pin-form input {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 15px;

    border: 1px solid #dfe5ee;
    border-radius: 11px;
    outline: 0;

    color: #182238;
    background: #ffffff;

    font: inherit;
    font-size: 14px;

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.jd-live-pin-form input:focus {
    border-color: #f47321;
    box-shadow: 0 0 0 4px rgba(244, 115, 33, 0.12);
}

.jd-live-access-note {
    width: min(100%, 520px);

    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-top: 22px;
    padding-top: 19px;

    border-top: 1px solid #e5eaf1;

    color: #667085;
    font-size: 12px;
    line-height: 1.55;
    text-align: left;
}

.jd-live-access-note i {
    margin-top: 3px;
    color: #f47321;
}


/* =========================================================
   Panel lateral
   ========================================================= */

.jd-live-side {
    display: grid;
    gap: 16px;
}

.jd-live-info-card {
    padding: 22px;
}

.jd-live-info-card__heading {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 20px;
}

.jd-live-info-card__icon {
    flex: 0 0 auto;

    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;

    border: 1px solid rgba(244, 115, 33, 0.24);
    border-radius: 12px;

    color: #e85d0f;
    background: #fff8ef;
}

.jd-live-info-card__heading small,
.jd-live-agenda-link small {
    display: block;
    margin-bottom: 3px;

    color: #e85d0f;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.jd-live-info-card__heading h2 {
    margin: 0;

    color: #17233c;
    font-size: 17px;
    line-height: 1.2;
}

.jd-live-details {
    margin: 0;
}

.jd-live-kv {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;

    padding: 13px 0;

    border-top: 1px solid #edf1f5;
}

.jd-live-kv dt {
    color: #8090a6;
    font-size: 12px;
}

.jd-live-kv dd {
    min-width: 0;
    margin: 0;

    color: #233a61;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.jd-live-description {
    color: #667085;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.jd-live-description:empty::before {
    content: "No se agregó una descripción para este evento.";
    color: #98a2b3;
}

.jd-live-agenda-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 18px 20px;

    color: #17233c;
    text-decoration: none;

    transition:
        border-color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.jd-live-agenda-link strong {
    display: block;

    font-size: 13px;
}

.jd-live-agenda-link > i {
    color: #f47321;
}

.jd-live-agenda-link:hover {
    border-color: rgba(244, 115, 33, 0.42);

    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(16, 25, 43, 0.1);
}


/* =========================================================
   Accesibilidad
   ========================================================= */

.jd-live-page a:focus-visible,
.jd-live-page button:focus-visible,
.jd-live-page input:focus-visible {
    outline: 3px solid rgba(244, 115, 33, 0.3);
    outline-offset: 3px;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 980px) {

    .jd-live-page {
        --jd-live-side-width: 280px;

        margin-top: 28px;
    }

    .jd-live-hero {
        grid-template-columns: minmax(0, 1fr) 112px;

        padding: 28px 32px;
    }

    .jd-live-shell {
        grid-template-columns:
            minmax(0, 1fr)
            var(--jd-live-side-width);
    }

}

@media (max-width: 820px) {

    .jd-live-page {
        width: min(100% - 24px, 720px);
        margin-bottom: 80px;
    }

    .jd-live-hero {
        grid-template-columns: 1fr;
        gap: 20px;

        width: 100%;
        min-height: auto;
    }

    .jd-live-hero__signal {
        position: absolute;
        right: -34px;
        bottom: -52px;

        opacity: 0.42;
    }

    .jd-live-hero__content {
        max-width: 620px;
    }

    .jd-live-shell {
        grid-template-columns: 1fr;
    }

    .jd-live-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jd-live-agenda-link {
        grid-column: 1 / -1;
    }

}

@media (max-width: 620px) {

    .jd-live-page {
        width: min(100% - 20px, 560px);
        margin-top: 28px;
    }

    .jd-live-hero {
        padding: 29px 24px;

        border-radius: 20px;
    }

    .jd-live-back {
        margin-bottom: 24px;
    }

    .jd-live-hero h1 {
        font-size: clamp(32px, 11vw, 43px);
    }

    .jd-live-meta {
        display: grid;
        gap: 9px;

        margin-top: 21px;
    }

    .jd-live-summary {
        font-size: 14px;
    }

    .jd-live-shell {
        gap: 16px;
        margin-top: 16px;
    }

    .jd-live-player-card,
    .jd-live-access-card,
    .jd-live-info-card,
    .jd-live-agenda-link {
        border-radius: 16px;
    }

    .jd-live-waiting,
    .jd-live-access-card {
        min-height: 410px;
        padding: 38px 22px;
    }

    .jd-live-waiting h2,
    .jd-live-access-card h2 {
        font-size: 27px;
    }

    .jd-live-waiting p,
    .jd-live-access-card > p {
        font-size: 14px;
    }

    .jd-live-actions,
    .jd-live-waiting__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .jd-live-btn {
        width: 100%;
    }

    .jd-live-pin-form__controls {
        grid-template-columns: 1fr;
    }

    .jd-live-pin-form button {
        width: 100%;
    }

    .jd-live-side {
        grid-template-columns: 1fr;
    }

    .jd-live-agenda-link {
        grid-column: auto;
    }

}

@media (max-width: 420px) {

    .jd-live-hero {
        padding-right: 20px;
        padding-left: 20px;
    }

    .jd-live-player__badge {
        top: 12px;
        left: 12px;
    }

    .jd-live-info-card {
        padding: 19px;
    }

}

/* =========================================================
   Popup compacto para compartir transmisión
   ========================================================= */

.jd-live-share-popover {
    position: absolute;
    z-index: 30;
    bottom: calc(100% - 5px);
    left: 20px;

    width: min(360px, calc(100% - 40px));
    padding: 16px;

    border: 1px solid #e2e8f1;
    border-radius: 17px;

    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 22px 55px rgba(16, 25, 43, 0.2),
        0 4px 14px rgba(16, 25, 43, 0.08);

    opacity: 0;
    transform: translateY(8px) scale(0.985);
    transform-origin: left bottom;
    pointer-events: none;

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

.jd-live-share-popover::after {
    content: "";

    position: absolute;
    bottom: -7px;
    left: 30px;

    width: 13px;
    height: 13px;

    border-right: 1px solid #e2e8f1;
    border-bottom: 1px solid #e2e8f1;

    background: #ffffff;
    transform: rotate(45deg);
}

.jd-live-share-popover.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.jd-live-share-popover__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 14px;
}

.jd-live-share-popover__header > div {
    display: grid;
    gap: 3px;
}

.jd-live-share-popover__header small {
    color: #f47321;

    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.jd-live-share-popover__header strong {
    color: #17233c;

    font-size: 18px;
    line-height: 1.15;
}

.jd-live-share-popover__close {
    width: 34px;
    height: 34px;

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

    border: 1px solid #e5eaf1;
    border-radius: 10px;

    color: #667085;
    background: #f7f9fc;

    cursor: pointer;
}

.jd-live-share-popover__close:hover {
    color: #17233c;
    background: #ffffff;
}

.jd-live-share-popover__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.jd-live-share-option {
    min-width: 0;
    min-height: 78px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 10px 5px;

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

    color: #233a61;
    background: #ffffff;

    cursor: pointer;

    transition:
        border-color 150ms ease,
        background 150ms ease,
        transform 150ms ease;
}

.jd-live-share-option:hover {
    border-color: #ccd7e6;
    background: #f7f9fc;
    transform: translateY(-1px);
}

.jd-live-share-option > span {
    width: 32px;
    height: 32px;

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

    border-radius: 10px;

    color: #17233c;
    background: #f2f5f9;

    font-size: 15px;
    font-weight: 900;
}

.jd-live-share-option b {
    max-width: 100%;

    overflow: hidden;

    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jd-live-share-option--facebook > span {
    color: #1877f2;
    background: rgba(24, 119, 242, 0.1);
}

.jd-live-share-option--whatsapp > span {
    color: #168c46;
    background: rgba(37, 211, 102, 0.12);
}

.jd-live-share-option--x > span {
    color: #ffffff;
    background: #10192b;
}

.jd-live-share-option--copy > span {
    color: #e85d0f;
    background: #fff5eb;
}

.jd-live-share-more {
    width: 100%;
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: 10px;
    padding: 0 13px;

    border: 1px solid #e5eaf1;
    border-radius: 11px;

    color: #233a61;
    background: #f7f9fc;

    font: inherit;
    font-size: 12px;
    font-weight: 800;

    cursor: pointer;
}

.jd-live-share-more > span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.jd-live-share-more:hover {
    border-color: rgba(244, 115, 33, 0.32);

    color: #17233c;
    background: #fff8f2;
}

.jd-live-share-option:focus-visible,
.jd-live-share-more:focus-visible,
.jd-live-share-popover__close:focus-visible {
    outline: 3px solid rgba(244, 115, 33, 0.25);
    outline-offset: 2px;
}

@media (max-width: 520px) {

    .jd-live-share-popover {
        right: 12px;
        bottom: calc(100% - 3px);
        left: 12px;

        width: auto;
        padding: 14px;

        border-radius: 15px;
        transform-origin: center bottom;
    }

    .jd-live-share-popover::after {
        left: 35px;
    }

    .jd-live-share-popover__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jd-live-share-option {
        min-height: 68px;

        flex-direction: row;
        justify-content: flex-start;

        padding: 9px 11px;
    }

    .jd-live-share-option b {
        font-size: 11px;
    }

}

