/* ===== Vecko- / dagtablå ===== */
/*
 * Hög specificitet + !important på designfält: överstyr äldre tema-CSS
 * (t.ex. Divi Extra: .dayholder h3, .klockan, .tabloshow med !important).
 * Ta bort duplicerad tablå-CSS i temat när pluginets Design används.
 */

.narradiotablo .dayholder {
    margin-bottom: 1.75rem;
}

.narradiotablo .dayholder:last-child {
    margin-bottom: 0;
}

.narradiotablo .dayholder > h3.radio-day-heading,
.narradiotablo .radio-day-heading {
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.85rem 0.55rem 0.95rem;
    line-height: 1.3;
    font-size: 1.125rem !important;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--rt-header-text, #ffffff) !important;
    background: var(--rt-header-bg, #0198f3) !important;
    border-left: var(--rt-header-accent-width, 0) solid var(--rt-header-accent-color, transparent) !important;
    border-radius: var(--rt-header-radius, 0) !important;
    text-transform: var(--rt-header-text-transform, capitalize) !important;
    box-shadow: none;
}

.narradiotablo .dayholder .tabloshow,
.narradiotablo .tabloshow {
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
    min-height: 56px;
    background: var(--rt-post-bg, #ffffff) !important;
    border: 1px solid var(--rt-post-border, #999999) !important;
    border-bottom: 1px solid var(--rt-post-border, #999999) !important;
    border-radius: var(--rt-post-radius, 0) !important;
    box-shadow: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.narradiotablo .dayholder .tabloshow:last-child {
    margin-bottom: 0;
}

.narradiotablo .tabloshow:hover {
    border-color: #d5dde5;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.07);
}

.narradiotablo .tabloshow__logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--rt-logo-width-desktop, 56px);
    max-width: var(--rt-logo-width-desktop, 56px);
}

.narradiotablo .tabloshow__logo img {
    display: block;
    width: auto;
    max-width: var(--rt-logo-width-desktop, 56px);
    height: 100%;
    min-height: 48px;
    max-height: 64px;
    object-fit: contain;
}

/* Placeholder när ingen programlogotyp är uppladdad (today / week) */
.narradiotablo .tabloshow__logo--placeholder {
    width: var(--rt-logo-width-desktop, 56px);
    min-height: 48px;
    align-self: stretch;
    border-radius: 8px;
    background:
        linear-gradient(145deg, #f4f6f8 0%, #e3e8ed 55%, #d5dce3 100%);
    border: 1px solid #cfd6dd;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.narradiotablo .tabloshow__logo--placeholder::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: -11px 0 0 -7px;
    border: 2px solid #9aa5b1;
    border-radius: 50%;
    box-sizing: border-box;
}

.narradiotablo .tabloshow__logo--placeholder::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 10px;
    margin: 2px 0 0 -3px;
    background: #9aa5b1;
    border-radius: 0 0 3px 3px;
    box-shadow:
        -9px -4px 0 -5px #b8c0c8,
        9px -4px 0 -5px #b8c0c8,
        -14px -2px 0 -7px #c5ccd4,
        14px -2px 0 -7px #c5ccd4;
}

.narradiotablo .tabloshow__body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 14px 18px;
}

.narradiotablo .tabloshow .klockan,
.narradiotablo .tabloshow .tabloshow__time {
    flex: 0 0 6.5rem;
    min-width: 6.5rem;
    padding-top: 2px;
    font-style: normal !important;
    font-size: var(--rt-time-size, 1rem) !important;
    font-weight: var(--rt-time-weight, 700) !important;
    line-height: 1.35;
    color: var(--rt-time-color, #ff0000) !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.narradiotablo .tabloshow__time-range {
    display: inline-block;
}

.narradiotablo .tabloshow__content {
    flex: 1;
    min-width: 0;
}

.narradiotablo .tabloshow__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    line-height: 1.4;
}

.narradiotablo .tabloshow .tabloshowname,
.narradiotablo .tabloshow .tabloshowname .tabloshow__title,
.narradiotablo .tabloshow__title {
    font-size: var(--rt-title-size, 0.875rem) !important;
    font-weight: var(--rt-title-weight, 400) !important;
    color: var(--rt-title-color, #1a2332) !important;
}

.narradiotablo .tabloshow .tabloshowhost,
.narradiotablo .tabloshowhost {
    margin-top: 0.35rem;
    font-size: var(--rt-host-size, 0.875rem) !important;
    line-height: 1.45;
    color: var(--rt-host-color, #5a6572) !important;
    font-weight: var(--rt-host-weight, 400) !important;
}

.narradiotablo .tabloshow__host-label {
    color: var(--rt-host-label-color, #7a8490);
    font-size: var(--rt-host-label-size, 0.9rem);
    font-weight: var(--rt-host-label-weight, 500);
}

.narradiotablo .tabloshowdesc {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px dashed #e8ecef;
    color: var(--rt-desc-color, #5c6570);
    font-size: var(--rt-desc-size, 0.9rem);
    font-weight: var(--rt-desc-weight, 400);
    line-height: 1.5;
}

.narradiotablo .tabloshow--on-break {
    background: #fffaf5;
    border-color: #f0e0d0;
}

.narradiotablo .tabloshow--on-air {
    box-shadow: inset var(--rt-onair-accent-width, 4px) 0 0 var(--rt-onair-accent-color, #27ae60);
}

.narradiotablo .radio-on-air-badge {
    display: inline-block;
    background: var(--rt-onair-badge-bg, #27ae60);
    color: var(--rt-onair-badge-text, #fff);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.35;
    margin-left: 6px;
}

.narradiotablo .radio-progress {
    width: 100%;
    margin: 10px 0;
}

.narradiotablo .radio-progress-track {
    width: 100%;
    height: var(--rt-progress-height, 6px);
    background: var(--rt-progress-track, #e5e5e5);
    border-radius: 999px;
    overflow: visible;
    position: relative;
}

.narradiotablo .radio-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--rt-progress-fill, #2ecc71);
    border-radius: 999px;
    transition: width 0.5s linear;
    position: relative;
    min-width: 0;
}

.narradiotablo .radio-progress-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 4px;
    color: var(--rt-progress-label-color, #fff);
    background: var(--rt-progress-label-bg, var(--rt-progress-fill, #2ecc71));
    white-space: nowrap;
}

.narradiotablo .radio-progress--label-follow .radio-progress-track {
    overflow: visible;
    margin-top: 10px;
}

.narradiotablo .radio-progress--label-follow .radio-progress-label {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
}

.narradiotablo .radio-progress:not(.radio-progress--label-follow) > .radio-progress-label {
    margin-bottom: 6px;
}

.narradiotablo .radio-break-badge {
    display: inline-block;
    background: #e67e22;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.35;
}

.narradiotablo .radio-info-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    font-style: italic;
    cursor: help;
    flex-shrink: 0;
    border: none;
    padding: 0;
    line-height: 1;
}

.narradiotablo .radio-info-tip__popup {
    display: none;
    position: absolute;
    z-index: 100;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    min-width: 180px;
    max-width: 280px;
    padding: 8px 10px;
    background: #1e1e1e;
    color: #fff;
    font-size: 12px;
    font-weight: normal;
    font-style: normal;
    line-height: 1.4;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: left;
    white-space: normal;
}

.narradiotablo .radio-info-tip.is-open .radio-info-tip__popup,
.narradiotablo .radio-info-tip:hover .radio-info-tip__popup,
.narradiotablo .radio-info-tip:focus .radio-info-tip__popup {
    display: block;
}

.narradiotablo .radio-player-current {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.narradiotablo .radio-player-current__title {
    font-weight: 600;
}

.narradiotablo .radio-programbank-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1a6b3c;
    text-decoration: none;
    border-bottom: 1px solid rgba(26, 107, 60, 0.35);
}

.narradiotablo .radio-programbank-link:hover {
    color: #145a32;
    border-bottom-color: #145a32;
}

.narradiotablo .radio-programbank-link::before {
    content: "▶ ";
    font-size: 0.85em;
}

@media (max-width: 480px) {
    .narradiotablo .tabloshow__logo,
    .narradiotablo .tabloshow__logo img,
    .narradiotablo .tabloshow__logo--placeholder {
        width: var(--rt-logo-width-mobile, 48px);
        max-width: var(--rt-logo-width-mobile, 48px);
    }

    .narradiotablo .tabloshow__body {
        flex-direction: column;
        gap: 6px;
    }

    .narradiotablo .tabloshow__time {
        flex: none;
        min-width: 0;
        padding-top: 0;
    }
}

/* ===== Aktuellt program (webb) ===== */

.narradiotablo .radio-current-web__heading {
    margin: 0 0 12px;
}

.narradiotablo .radio-current-web__main {
    display: flex;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 8px;
}

.narradiotablo .radio-current-web__logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    max-width: 120px;
}

.narradiotablo .radio-current-web__logo img {
    display: block;
    width: auto;
    max-width: 120px;
    max-height: 120px;
    height: auto;
    object-fit: contain;
}

.narradiotablo .radio-current-web__meta {
    flex: 1;
    min-width: 0;
}

.narradiotablo .radio-current-web__time {
    margin: 0 0 6px;
    font-weight: 600;
}

.narradiotablo .radio-current-web__title {
    margin: 0 0 6px;
}

.narradiotablo .radio-current-web__host {
    margin: 0;
    color: #444;
}
