/* ----- Aprovechamiento total del ancho de pantalla ----- */
.ctv-epg-section {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    overflow: visible;
}

.ctv-epg-section > .section__inner {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    padding-left: 8px;
    padding-right: 8px;
}

.ctv-epg-section .section__title {
    margin-left: 0;
    padding-left: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* ----- EPG ----- */

.ctv-epg-section {
    margin-top: 6px;
}

.ctv-epg-shell {
    position: relative;
    margin-top: 14px;
}

.ctv-epg {
    --ctv-epg-day-w: 132px;
    --ctv-epg-head-h: 42px;
    --ctv-epg-row-h: 72px;
    --ctv-epg-half-hour: 78px;

    display: grid;
    grid-template-columns: var(--ctv-epg-day-w) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 15px;
    background:
        linear-gradient(180deg, rgba(14,23,43,.96), rgba(5,10,22,.98));
    box-shadow: 0 18px 48px rgba(0,0,0,.18);
}

.ctv-epg__days {
    position: relative;
    z-index: 4;
    border-right: 1px solid rgba(255,255,255,.09);
    background: rgba(5,12,26,.98);
    box-shadow: 8px 0 18px rgba(0,0,0,.14);
}

.ctv-epg__corner,
.ctv-epg__day {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 14px;
}

.ctv-epg__corner {
    height: var(--ctv-epg-head-h);
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.55);
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ctv-epg__day {
    height: var(--ctv-epg-row-h);
    border-bottom: 1px solid rgba(255,255,255,.065);
}

.ctv-epg__day:last-child {
    border-bottom: 0;
}

.ctv-epg__day-name {
    color: #f5f7ff;
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.05;
}

.ctv-epg__day-date {
    margin-top: 4px;
    color: rgba(219,226,247,.57);
    font-size: .72rem;
}

.ctv-epg__day.is-today {
    background: rgba(49,184,189,.07);
}

.ctv-epg__day.is-today .ctv-epg__day-name {
    color: #75e2e5;
}

.ctv-epg__scroller {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ctv-epg__scroller::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.ctv-epg__track {
    position: relative;
}

.ctv-epg__times {
    position: relative;
    height: var(--ctv-epg-head-h);
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(7,15,31,.96);
}

.ctv-epg__tick {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    border-left: 1px solid rgba(255,255,255,.065);
}

.ctv-epg__tick-label {
    position: absolute;
    top: 11px;
    transform: translateX(8px);
    color: rgba(228,234,251,.68);
    font-size: .71rem;
    font-weight: 700;
    white-space: nowrap;
}

.ctv-epg__row {
    position: relative;
    height: var(--ctv-epg-row-h);
    border-bottom: 1px solid rgba(255,255,255,.065);
    background:
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent calc(var(--ctv-epg-half-hour) - 1px),
            rgba(255,255,255,.045) calc(var(--ctv-epg-half-hour) - 1px),
            rgba(255,255,255,.045) var(--ctv-epg-half-hour)
        );
}

.ctv-epg__row:last-child {
    border-bottom: 0;
}

.ctv-epg__row.is-today {
    background-color: rgba(49,184,189,.018);
}

.ctv-epg__empty {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(220,226,244,.25);
    font-size: .78rem;
    pointer-events: none;
}

.ctv-epg__block {
    position: absolute;
    top: 6px;
    bottom: 6px;
    min-width: 36px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.095);
    border-radius: 9px;
    padding: 8px 10px;
    color: #f7f9ff;
    text-decoration: none;
    background: rgba(25,36,59,.92);
    transition:
        border-color .16s ease,
        background .16s ease,
        transform .16s ease;
}

.ctv-epg__block:hover {
    z-index: 3;
    border-color: rgba(96,183,254,.52);
    background: rgba(32,49,81,.98);
    transform: translateY(-1px);
    text-decoration: none;
}

.ctv-epg__block--live {
    border-color: rgba(79,143,201,.52);
    background:
        linear-gradient(135deg, rgba(24,67,108,.98), rgba(20,53,87,.98));
}

.ctv-epg__block--recorded {
    border-color: rgba(63,94,132,.42);
    background:
        linear-gradient(135deg, rgba(15,31,54,.98), rgba(10,23,42,.98));
}

.ctv-epg__block.is-now {
    outline: 2px solid #60b7fe;
    outline-offset: -2px;
    box-shadow: 0 0 0 1px rgba(96,183,254,.20), 0 8px 18px rgba(0,0,0,.24);
}

.ctv-epg__block-title {
    overflow: hidden;
    font-size: .8rem;
    font-weight: 800;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ctv-epg__block-sub {
    margin-top: 4px;
    overflow: hidden;
    color: rgba(230,236,250,.69);
    font-size: .68rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ctv-epg__block-kind {
    display: inline-flex;
    margin-right: 5px;
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .02em;
}

.ctv-epg__block--live .ctv-epg__block-kind {
    color: #b9ffdb;
}

.ctv-epg__block--recorded .ctv-epg__block-kind {
    color: #b9ddff;
}

.ctv-epg__now-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    z-index: 2;
    pointer-events: none;
    background: #60b7fe;
    box-shadow: 0 0 9px rgba(96,183,254,.55);
}

.ctv-epg__nav {
    position: absolute;
    top: 50%;
    z-index: 12;
    width: 40px;
    height: 66px;
    transform: translateY(-50%);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
    background: rgba(4,10,22,.94);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    opacity: .88;
    box-shadow: 0 8px 22px rgba(0,0,0,.28);
    transition: opacity .16s ease, background .16s ease, transform .16s ease;
}

.ctv-epg__nav:hover,
.ctv-epg__nav:focus-visible {
    opacity: 1;
    background: rgba(15,28,50,.99);
}

.ctv-epg__nav:disabled {
    opacity: .18;
    cursor: default;
    pointer-events: none;
}

.ctv-epg__nav--left {
    left: 124px;
}

.ctv-epg__nav--right {
    right: 8px;
}

.ctv-epg__legend {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 9px;
    color: rgba(220,226,245,.58);
    font-size: .72rem;
}

.ctv-epg__legend-item {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.ctv-epg__legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ctv-epg__legend-dot--live {
    background: #4f8fc9;
}

.ctv-epg__legend-dot--recorded {
    background: #294866;
}

@media (max-width: 760px) {
    .ctv-epg {
        --ctv-epg-day-w: 104px;
        --ctv-epg-row-h: 66px;
        --ctv-epg-half-hour: 70px;
    }

    .ctv-epg__corner,
    .ctv-epg__day {
        padding-left: 10px;
        padding-right: 9px;
    }

    .ctv-epg__day-name {
        font-size: .82rem;
    }

    .ctv-epg__nav--left {
        left: 111px;
    }

    .ctv-epg__block {
        padding: 7px 8px;
    }
}


/* =========================================================
   ConscienTV · EPG v2.7
   ========================================================= */

.ctv-epg-section > .section__inner {
    padding-left: 8px;
    padding-right: 8px;
}

.ctv-epg {
    --ctv-epg-day-w: 116px;
    --ctv-epg-head-h: 40px;
    --ctv-epg-row-h: 78px;
    --ctv-epg-half-hour: 92px;
    border-radius: 14px;
}

.ctv-epg__corner,
.ctv-epg__day {
    padding-left: 12px;
    padding-right: 10px;
}

.ctv-epg__track {
    min-width: 100%;
}

.ctv-epg__row {
    background:
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent calc(var(--ctv-epg-half-hour) - 1px),
            rgba(255,255,255,.045) calc(var(--ctv-epg-half-hour) - 1px),
            rgba(255,255,255,.045) var(--ctv-epg-half-hour)
        );
}

.ctv-epg__block {
    top: 5px;
    bottom: 5px;
    min-width: 46px;
    padding: 3px 8px 3px 3px;
    display: grid;
    grid-template-columns: 54px minmax(0,1fr);
    gap: 6px;
    align-items: center;
    container-type: inline-size;
}

.ctv-epg__block:not(:has(.ctv-epg__block-thumb)) {
    grid-template-columns: minmax(0,1fr);
}

.ctv-epg__block-thumb {
    width: 54px;
    height: 54px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0,0,0,.12);
    border: 1px solid rgba(255,255,255,.06);
}

.ctv-epg__block-thumb img {
    display: block;
    max-width: 96%;
    max-height: 96%;
    object-fit: contain;
}

.ctv-epg__block-copy {
    min-width: 0;
    overflow: hidden;
}

.ctv-epg__block-title {
    font-size: .79rem;
    line-height: 1.12;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ctv-epg__block-hosts {
    margin-top: 3px;
    color: rgba(239,245,255,.78);
    font-size: .64rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ctv-epg__block-sub {
    margin-top: 4px;
    font-size: .61rem;
    line-height: 1.05;
    color: rgba(230,236,250,.62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ctv-epg__block-kind {
    font-size: .55rem;
}

@container (max-width: 135px) {
    .ctv-epg__block-thumb { display: none; }
    .ctv-epg__block { grid-template-columns: minmax(0,1fr); }
    .ctv-epg__block-hosts { display: none; }
}

@container (max-width: 95px) {
    .ctv-epg__block-sub { display: none; }
}



@media (max-width: 760px) {
    .ctv-epg {
        --ctv-epg-day-w: 94px;
        --ctv-epg-row-h: 70px;
    }
}
