.epg-container {
    display: flex;
    flex-wrap: wrap;
    background-color: rgba(255, 255, 255, 0.075);
    overflow: hidden;
    margin-top: 0.5em;
    height: 60%;
    /* display: none; */
}

.epg-container-item {
    position: relative;
}

.epg-break {
    flex-basis: 100%;
    height: 0;
}

.epg-container .row {
    margin: 0;
}
.epg-grid {
    margin: 0;
    /* width: 100%; */
    white-space: nowrap;
    overflow: auto;
    /* padding: 10px; */
    /* max-height: 100vh; */
}

.epg-hours {
    overflow: auto;
}

.epg-channels {
    overflow: auto;
    /* max-height: 100vh; */
}

.epg-grid .row {
    height: 3em; /* default value, after load EPG the height is setted automatically*/
}

.epg-hour-header {
    background-color: #8C8C8C;
}

.epg-date-indicator {
    background-color: #8C8C8C;
    width: 100%;
    text-align: center;
    visibility: hidden;
}

.epg-channel-header {
    background-color: #415661;
    padding: 0;
}

.epg-channel-header div {
    vertical-align: middle;
    display: flex;
    width: 100%;
}

.epg-channel-header div  span {
    width: 50%;
    text-align: center;
    font-size: 1.2em;
    vertical-align: middle;
}

.epg-channel-header div > img {
    width: 4em;
    height: 100%;
    background: rgba(255, 255, 255, 0);
}

.epg-channel-item {
    background-color: #415661;
    height: 4.92em;
}

.epg-cell {
    color: #FFF;
    overflow: hidden;
    display: inline-block;
    float: none;
    margin: 0.01em;
    padding: 1em 0.2em;
}

.epg-cell-title {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Eventos <30 min (punto 24): antes su ancho real (duration * 0.2em/min)
   dejaba el título cortado a la mitad sin ninguna pista visual de qué
   programa era. min-width es deliberadamente chico (no se agranda para
   "caber" el texto) para no solapar la celda siguiente, que está
   posicionada de forma absoluta según la hora real; el borde de color da
   una señal visible de "hay un evento aquí" y el tooltip al enfocar
   muestra el título y horario completos. */
.epg-cell-short,
.epg-cell-very-short {
    min-width: 0.6em;
    border-left: 0.15em solid #F58225;
}

/* Punto 33: canal cuya EPG falló al cargar (timeout/red), distinto de un
   canal que simplemente no tiene programación. Mismo tratamiento visual
   liviano que epg-cell-short (borde de color), sin scale/box-shadow. */
.epg-cell-load-error {
    background-color: rgba(231, 76, 60, 0.25);
    border-left: 0.15em solid #e74c3c;
}

.epg-cell-tooltip {
    display: none;
}

.epg-cell-short.focus,
.epg-cell-very-short.focus {
    overflow: visible;
    z-index: 50;
}

.epg-cell-short.focus .epg-cell-tooltip,
.epg-cell-very-short.focus .epg-cell-tooltip {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 14em;
    max-width: 22em;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid #F58225;
    border-radius: 0.3em;
    padding: 0.5em 0.7em;
    white-space: normal;
    z-index: 999;
}

.epg-cell-tooltip-title {
    display: block;
    font-weight: bold;
    margin-bottom: 0.2em;
}

.epg-cell-tooltip-time {
    display: block;
    color: #ccc;
    font-size: 0.85em;
}

.epg-cell:focus {
    transform: 0!important;
}

/* .menu-grid .row .epg-cell:first-child {
    background-color: purple!important;
    position: sticky;
    left: 0;
    z-index: 1;
} */

.epg-current-time-indicator {
    position: absolute;
    width: 3px;
    top: 0;
    left: 0;
    height: 100%;
    opacity: 0.6;
    z-index: 999;
}

.epg-message {
    position: absolute;
    top: 44%;
    left: 44%;
    color: #FFF;
    font-size: 2em;
}

#epgFocusPosition {
    position: fixed;
    top: 1px;
    left: 1px;
    width: 10px;
    height: 10px;
    background: red;
    z-index: 1000;
    border-radius: 10px;
    display: none;
}

.epg-dialog-details row:nth-child(1) {
    display: flex;
    margin-bottom: 0.4em;
}

.epg-dialog-details-img, .epg-dialog-details-event-img {
    width: 100%;
    height: 100%;
    border-radius: 10%;
    -webkit-border-radius: 10%;
    -moz-border-radius: 10%;
    -ms-border-radius: 10%;
    -o-border-radius: 10%;
    object-fit: cover;
}

.epg-dialog-details-header-info {
    height: 6em;display: flex;flex-direction: column;
}

.epg-dialog-details-header-info h3, .epg-dialog-details-header-info p {
    flex-grow: 1;
}

.epg-dialog-details-title {
    margin-bottom: 0.4em;
}

.epg-dialog-live .focus,
.epg-dialog-details .focus {
  border: 3px solid #ffffff !important;
  box-shadow: 0 0 10px #ffffff !important;
  transform: scale(1.03);
  z-index: 999;
}
