/* =============================================================
   PDV – Guida TV
   ============================================================= */

.pdv-gtv-wrap { font-family: inherit; }

/*  Barra navigazione data ─ */
.pdv-gtv-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background-color: #f0f6ff;
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.pdv-gtv-nav-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pdv-gtv-nav-label {
    font-size: 1em;
    font-weight: 700;
    color: #1a3a5c;
    text-transform: capitalize;
    letter-spacing: 0.01em;
}

.pdv-gtv-nav-date {
    font-size: 0.78em;
    font-weight: 500;
    color: #5a7a9a;
    text-transform: capitalize;
}

/*  Pulsanti freccia  */
.pdv-gtv-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border-radius: 50%;
    background-color: #1565C0;
    color: #fff;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color .2s, transform .15s, opacity .2s;
}
.pdv-gtv-nav-btn:hover:not(:disabled) { background-color: #0d47a1; transform: scale(1.08); }
.pdv-gtv-nav-btn:disabled,
.pdv-gtv-nav-btn[aria-disabled="true"] {
    opacity: 0.3;
    cursor: not-allowed;
}

/*  Lista programmi  */
.pdv-gtv-list-wrap { position: relative; }

.pdv-gtv-list { display: flex; flex-direction: column; gap: 10px; }

/*  Riga programma  */
.pdv-gtv-row {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 6px 18px;
    transition: box-shadow .2s;
}
.pdv-gtv-row:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09); }
.pdv-gtv-row--current { background-color: #f0f6ff; }

.pdv-gtv-row-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px;
    flex-wrap: nowrap;
}

/*  Orario  */
.pdv-gtv-time {
   padding: 3px 6px;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    min-width: 36px;
    flex-shrink: 0;
    border: 2px solid #3381CD;
}

/*  Nome programma  */
.pdv-gtv-row-name {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/*  Badge "In onda ora"  */
.pdv-gtv-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #e53935;
    color: #fff;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.pdv-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: pdv-blink 1.2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pdv-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
}

/*  Durata  */
.pdv-gtv-duration {
    font-size: 0.78em;
    color: #9aabbb;
    white-space: nowrap;
    flex-shrink: 0;
}

/*  Pulsante +/−  */
.pdv-gtv-toggle {
    padding: 15px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #1565C0;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color .2s, transform .15s;
    fill: #fff;
}
.pdv-gtv-toggle:hover { background-color: #0d47a1; transform: scale(1.08); }

.pdv-gtv-plus,
.pdv-gtv-minus {
    display: block;
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
}
.pdv-gtv-minus                                          { display: none; }
.pdv-gtv-toggle[aria-expanded="true"] .pdv-gtv-plus  { display: none; }
.pdv-gtv-toggle[aria-expanded="true"] .pdv-gtv-minus { display: block; }

/*  Pannello espanso  */
.pdv-gtv-row-panel[hidden] { display: none; }

.pdv-gtv-row-panel-inner {
    display: flex;
    gap: 16px;
    padding: 4px 4px 18px;
    flex-wrap: wrap;
}

.pdv-gtv-row-img {
    width: 140px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.pdv-gtv-row-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

.pdv-gtv-desc {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.pdv-gtv-live-badge--plain {
   background-color: #3381cd !important;
}

.pdv-gtv-live-badge--plain .pdv-live-dot{
    display: none;
}

/*  Segnaposto immagine mancante  */
.pdv-gtv-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8edf2;
    color: #aab4c0;
    border-radius: 8px;
    flex-shrink: 0;
}

/*  Loading overlay  */
.pdv-gtv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    gap: 10px;
    color: #1565C0;
    font-size: 0.9em;
    font-weight: 500;
}

.pdv-gtv-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #dde8f5;
    border-top-color: #1565C0;
    border-radius: 50%;
    animation: pdv-spin 0.75s linear infinite;
    flex-shrink: 0;
}

@keyframes pdv-spin {
    to { transform: rotate(360deg); }
}

/*  Messaggi  */
.pdv-gtv-error {
    padding: 16px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: .9em;
    color: #555;
}
.pdv-gtv-empty {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 40px 0;
}

/*  Responsive  */
@media ( max-width: 600px ) {
    .pdv-gtv-row-header  { flex-wrap: wrap; }
    .pdv-gtv-row-name    { font-size: 0.93em; }
    .pdv-gtv-row-panel-inner { flex-direction: column; }
    .pdv-gtv-row-img     { width: 100%; height: 160px; }
    .pdv-gtv-duration    { display: none; }
}
