/* =============================================================
   Watch Next Video Widget — Frontend Styles
   ============================================================= */

/* ── Container ────────────────────────────────────────────── */
.wn-widget {
    font-family: inherit;
    background: #fff;
    padding: 20px;
    box-sizing: border-box;
}

/* ── Section Heading ──────────────────────────────────────── */
.wn-section-heading {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #000;
    margin: 0 0 14px;
}

/* ── Featured Row ─────────────────────────────────────────── */
.wn-featured-row {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
    align-items: flex-start;
}

/* ── Video Wrap ───────────────────────────────────────────── */
.wn-video-wrap {
    flex: 0 0 55%;
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    border-radius: 2px;
}

.wn-video-wrap .wn-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.wn-video-wrap .wn-fallback-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Info Panel ───────────────────────────────────────────── */
.wn-info-panel {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
    padding-top: 4px;
}

.wn-featured-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.wn-featured-title a {
    color: inherit;
    text-decoration: none;
}

.wn-featured-title a:hover {
    text-decoration: underline;
}

.wn-featured-excerpt {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #333;
    margin: 0;
}

/* ── Read More Button ─────────────────────────────────────── */
.wn-read-more {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4a9aba;
    border: 1.5px solid #4a9aba;
    padding: 6px 0;
    text-decoration: none;
    background: transparent;
    transition: background 0.2s, color 0.2s;
    align-self: flex-start;
    width: auto;
    text-align: left;
    box-sizing: border-box;
}

.wn-read-more:hover {
    background: #4a9aba;
    color: #fff;
}

/* ── Thumbnail Strip ──────────────────────────────────────── */
.wn-thumb-strip {
    display: flex;
    gap: 4px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
    align-items: stretch;
}

.wn-thumb-item {
    flex: 0 0 auto;
    width: calc( (100% - 36px) / 9 ); /* 9 items default + arrow */
    height: 71px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 3px solid transparent;
    box-sizing: border-box;
    transition: border-color 0.15s, opacity 0.15s;
    border-radius: 2px;
}

.wn-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.wn-thumb-item:hover {
    opacity: 0.85;
}

.wn-thumb-item.is-active {
    border-color: #4a9aba;
    border-width: 3px;
    border-style: solid;
}

.wn-thumb-no-image {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #555;
    text-align: center;
    padding: 4px;
    box-sizing: border-box;
}

/* ── Strip Scroll Arrow ───────────────────────────────────── */
.wn-strip-arrow {
    flex: 0 0 auto;
    width: 32px;
    height: 78px;
    background: #e8e8e8;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    margin-left: auto;
    border-radius: 2px;
}

.wn-strip-arrow:hover {
    background: #ccc;
}

/* ── YouTube Footer ───────────────────────────────────────── */
.wn-yt-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #333;
    margin-top: 4px;
}

.wn-yt-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.wn-yt-icon {
    height: 20px;
    width: auto;
}

/* ── Responsive ───────────────────────────────────────────── */
@media ( max-width: 768px ) {
    .wn-featured-row {
        flex-direction: column;
    }
    .wn-video-wrap {
        flex: unset;
        width: 100%;
    }
    .wn-thumb-item {
        width: calc( (100% - 36px) / 5 );
    }
}

@media ( max-width: 480px ) {
    .wn-thumb-item {
        width: calc( (100% - 36px) / 3 );
    }
}
