:host {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.epg-title {
    margin: 0;
    padding: 14px 16px 10px;
    font-size: 1.02rem;
    font-weight: 620;
    letter-spacing: 0.01em;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

.epg-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 10px 22px;
    box-sizing: border-box;
    scrollbar-gutter: stable;
}

.epg-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
        rgba(127, 127, 127, 0.045);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 20px -20px rgba(0, 0, 0, 0.35);
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;

    &:hover {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
            rgba(127, 127, 127, 0.065);
        transform: translateY(-1px);
    }

    &.current-program {
        background: linear-gradient(
            135deg,
            var(--app-selection-surface-strong),
            var(--app-selection-surface)
        );
        border-color: var(--app-selection-border);
        box-shadow:
            inset 0 0 0 1px var(--app-selection-border),
            0 12px 20px -18px var(--app-selection-glow);

        .epg-item__title,
        .epg-item__time,
        .epg-item__description,
        .epg-item__info {
            color: var(--app-selection-color);
        }
    }
}

.epg-item__meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.epg-item__time {
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    opacity: 0.76;
}

.epg-item__badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    line-height: 1.4;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: color-mix(in srgb, var(--app-selection-color) 18%, transparent);
    color: var(--app-selection-color);
    border: 1px solid color-mix(in srgb, var(--app-selection-border) 86%, transparent);
}

.epg-item__info {
    margin-inline-start: auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: inherit;
    opacity: 0.76;
    transition:
        opacity 0.15s ease,
        background-color 0.15s ease,
        transform 0.15s ease;

    &:hover {
        opacity: 1;
        background: color-mix(in srgb, currentColor 10%, transparent);
        transform: translateY(-1px);
    }
}

.epg-item__title {
    font-size: 0.94rem;
    line-height: 1.35;
    font-weight: 560;
    letter-spacing: 0.005em;
}

.epg-item__description {
    font-size: 0.82rem;
    line-height: 1.4;
    opacity: 0.74;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.epg-item__progress {
    padding-top: 4px;
}

.epg-progress-track {
    position: relative;
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background-color: rgba(127, 127, 127, 0.28);
    background-image: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.12),
        rgba(255, 255, 255, 0)
    );
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 1px 1px rgba(0, 0, 0, 0.18);
}

.epg-progress-fill {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    border-radius: inherit;
    background-color: var(--app-selection-color);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.18),
        rgba(255, 255, 255, 0)
    );
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--app-selection-border) 82%, transparent),
        0 0 10px -2px var(--app-selection-glow);
    transition: width 0.35s ease;
}

.epg-empty {
    padding: 22px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    text-align: center;
    font-size: 0.88rem;
    opacity: 0.66;
}
