/* ═══════════════════════════════════════════════════
   TechLogics Video Player v2.3 — Frontend Styles
   Uses viewport-width breakout to escape theme containers
   ═══════════════════════════════════════════════════ */

/* RESET inside player */
.tvp-wrap,
.tvp-wrap *,
.tvp-wrap *::before,
.tvp-wrap *::after {
    box-sizing: border-box !important;
}

/* ══════════════════════════════════════════════════
   CONTAINER — breaks out of ANY theme content column
   Uses the 100vw trick to stretch full viewport width,
   then centers itself with max-width
   ══════════════════════════════════════════════════ */
.tvp-wrap {
    position: relative !important;
    width: 100vw !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-top: 30px !important;
    margin-bottom: 30px !important;

    padding: 28px calc((100vw - 1100px) / 2) !important;

    background: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    line-height: 1.5 !important;
    color: #111111 !important;
    font-size: 14px !important;
    float: none !important;
    display: block !important;
    clear: both !important;
    overflow-x: hidden !important;
    border-top: 1px solid #ebebeb;
    border-bottom: 1px solid #ebebeb;
}

@media screen and (max-width: 1140px) {
    .tvp-wrap {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* ── Category pills ── */
.tvp-wrap .tvp-cats {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin: 0 auto 20px auto !important;
    padding: 0 0 18px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    list-style: none !important;
    max-width: 1100px !important;
    width: 100% !important;
    float: none !important;
}

.tvp-wrap .tvp-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 7px 16px !important;
    border-radius: 8px !important;
    border: 1px solid #e4e4e4 !important;
    color: #555 !important;
    background: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    outline: none !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.tvp-wrap .tvp-pill:hover {
    border-color: #ccc !important;
    color: #222 !important;
    background: #fafafa !important;
}

.tvp-wrap .tvp-pill--on {
    background: #111111 !important;
    color: #ffffff !important;
    border-color: #111111 !important;
}

.tvp-wrap .tvp-pill--on:hover {
    background: #222222 !important;
    color: #ffffff !important;
}

.tvp-wrap .tvp-pill--on .tvp-pill__count {
    background: rgba(255,255,255,0.2) !important;
    color: #ffffff !important;
}

.tvp-wrap .tvp-pill__dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

.tvp-wrap .tvp-pill__count {
    font-size: 11px !important;
    background: #f3f3f3 !important;
    color: #888 !important;
    padding: 1px 7px !important;
    border-radius: 10px !important;
    margin-left: 2px !important;
    display: inline-block !important;
    line-height: 1.5 !important;
}

/* ══════════════════════════════════════════════════
   GRID — Player left, Sidebar right
   ══════════════════════════════════════════════════ */
.tvp-wrap .tvp-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 22px !important;
    align-items: start !important;
    max-width: 1100px !important;
    width: 100% !important;
    margin: 0 auto !important;
    float: none !important;
}

.tvp-wrap .tvp-grid > .tvp-player {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    float: none !important;
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
}

.tvp-wrap .tvp-grid > .tvp-sidebar {
    display: block !important;
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    float: none !important;
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
}

/* ── Responsive ── */
@media screen and (max-width: 900px) {
    .tvp-wrap .tvp-grid {
        grid-template-columns: 1fr !important;
    }
    .tvp-wrap .tvp-grid > .tvp-player {
        grid-column: 1 / 2 !important;
        grid-row: 1 / 2 !important;
    }
    .tvp-wrap .tvp-grid > .tvp-sidebar {
        grid-column: 1 / 2 !important;
        grid-row: 2 / 3 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        max-height: 420px !important;
    }
}

@media screen and (max-width: 600px) {
    .tvp-wrap .tvp-pill {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
}

/* ══════════════════════════════════════════════════
   VIDEO PLAYER / EMBED
   ══════════════════════════════════════════════════ */
.tvp-wrap .tvp-embed {
    position: relative !important;
    width: 100% !important;
    padding-bottom: 56.25% !important;
    height: 0 !important;
    overflow: hidden !important;
    background: #000000 !important;
    border-radius: 12px !important;
}

.tvp-wrap .tvp-embed .tvp-iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 12px !important;
}

/* ── Video info ── */
.tvp-wrap .tvp-info {
    padding: 14px 0 0 0 !important;
}

.tvp-wrap .tvp-info__title {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #111111 !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.4 !important;
    padding: 0 !important;
    text-transform: none !important;
}

.tvp-wrap .tvp-info__meta {
    font-size: 13px !important;
    color: #888888 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tvp-wrap .tvp-info__sep {
    margin: 0 6px !important;
}

/* ══════════════════════════════════════════════════
   CHANNEL NAME (compact, inside player column)
   ══════════════════════════════════════════════════ */
.tvp-wrap .tvp-channel {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #f0f0f0 !important;
    flex-wrap: nowrap !important;
}

.tvp-wrap .tvp-channel__avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #FEE8E8 !important;
    color: #E24B4A !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
}

.tvp-wrap .tvp-channel__text {
    display: flex !important;
    flex-direction: column !important;
}

.tvp-wrap .tvp-channel__name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111111 !important;
    line-height: 1.3 !important;
}

.tvp-wrap .tvp-channel__handle {
    font-size: 12px !important;
    color: #999999 !important;
    line-height: 1.3 !important;
}

/* ══════════════════════════════════════════════════
   DARK CTA STRIP (full width, below grid)
   ══════════════════════════════════════════════════ */
.tvp-wrap .tvp-cta {
    margin-top: 20px !important;
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    display: block !important;
    float: none !important;
    clear: both !important;
}

.tvp-wrap .tvp-cta__inner {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    background: #111111 !important;
    border-radius: 12px !important;
    padding: 18px 24px !important;
    width: 100% !important;
    float: none !important;
}

.tvp-wrap .tvp-cta__avatar {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    border-radius: 50% !important;
    background: #CC0000 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
}

.tvp-wrap .tvp-cta__content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-width: 0 !important;
    gap: 3px !important;
}

.tvp-wrap .tvp-cta__name {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.tvp-wrap .tvp-cta__desc {
    font-size: 13px !important;
    color: #aaaaaa !important;
    line-height: 1.5 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.tvp-wrap .tvp-cta__btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    background: #CC0000 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 11px 26px !important;
    border-radius: 24px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    border: none !important;
    cursor: pointer !important;
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    flex-shrink: 0 !important;
    transition: background 0.2s ease !important;
}

.tvp-wrap .tvp-cta__btn:hover,
.tvp-wrap .tvp-cta__btn:focus,
.tvp-wrap .tvp-cta__btn:visited {
    background: #ee1111 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.tvp-wrap .tvp-cta__btn svg {
    flex-shrink: 0 !important;
    display: inline-block !important;
}

/* CTA responsive */
@media screen and (max-width: 600px) {
    .tvp-wrap .tvp-cta__inner {
        flex-direction: column !important;
        text-align: center !important;
        padding: 16px !important;
        gap: 12px !important;
    }
    .tvp-wrap .tvp-cta__content {
        align-items: center !important;
    }
    .tvp-wrap .tvp-cta__btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ══════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════ */
.tvp-wrap .tvp-sidebar {
    background: #fafafa !important;
    border-radius: 12px !important;
    padding: 14px !important;
    max-height: 600px !important;
    overflow-y: auto !important;
    border: 1px solid #f0f0f0 !important;
}

.tvp-wrap .tvp-sidebar__head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #eee !important;
}

.tvp-wrap .tvp-sidebar__label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #222 !important;
}

/* ── Autoplay toggle ── */
.tvp-wrap .tvp-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
}

.tvp-wrap .tvp-toggle__text {
    font-size: 12px !important;
    color: #888 !important;
}

.tvp-wrap .tvp-toggle__cb {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
}

.tvp-wrap .tvp-toggle__rail {
    display: inline-block !important;
    width: 36px !important;
    height: 20px !important;
    background: #ddd !important;
    border-radius: 10px !important;
    position: relative !important;
    transition: background 0.25s ease !important;
    flex-shrink: 0 !important;
}

.tvp-wrap .tvp-toggle__rail::after {
    content: '' !important;
    position: absolute !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    top: 2px !important;
    left: 2px !important;
    transition: transform 0.25s ease !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
}

.tvp-wrap .tvp-toggle__cb:checked + .tvp-toggle__rail {
    background: #111111 !important;
}

.tvp-wrap .tvp-toggle__cb:checked + .tvp-toggle__rail::after {
    transform: translateX(16px) !important;
}

/* ══════════════════════════════════════════════════
   SIDEBAR LIST & ITEMS
   ══════════════════════════════════════════════════ */
.tvp-wrap .tvp-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.tvp-wrap .tvp-item {
    display: flex !important;
    gap: 10px !important;
    padding: 8px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
    border: 1px solid transparent !important;
    align-items: stretch !important;
    text-decoration: none !important;
    background: transparent !important;
    float: none !important;
    width: 100% !important;
}

.tvp-wrap .tvp-item:hover {
    background: #f0f0f0 !important;
}

.tvp-wrap .tvp-item--active {
    background: #EEF6FF !important;
    border-color: #D0E3F7 !important;
}

.tvp-wrap .tvp-item--active:hover {
    background: #e6f0fc !important;
}

.tvp-wrap .tvp-item__bar {
    width: 4px !important;
    min-width: 4px !important;
    max-width: 4px !important;
    border-radius: 3px !important;
    align-self: stretch !important;
    flex-shrink: 0 !important;
}

.tvp-wrap .tvp-item__thumb {
    position: relative !important;
    min-width: 110px !important;
    width: 110px !important;
    height: 64px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background: #000 !important;
    flex-shrink: 0 !important;
}

.tvp-wrap .tvp-item__thumb img {
    width: 110px !important;
    height: 64px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 6px !important;
    max-width: none !important;
}

.tvp-wrap .tvp-item__dur {
    position: absolute !important;
    bottom: 4px !important;
    right: 4px !important;
    background: rgba(0,0,0,0.82) !important;
    color: #fff !important;
    font-size: 10px !important;
    padding: 1px 5px !important;
    border-radius: 3px !important;
    font-weight: 500 !important;
}

.tvp-wrap .tvp-item__info {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    flex: 1 !important;
    gap: 2px !important;
}

.tvp-wrap .tvp-item__title {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #222 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-transform: none !important;
}

.tvp-wrap .tvp-item__meta {
    font-size: 11px !important;
    color: #999 !important;
}

.tvp-wrap .tvp-item__badge {
    font-size: 10px !important;
    padding: 2px 8px !important;
    border-radius: 10px !important;
    display: inline-block !important;
    width: fit-content !important;
    font-weight: 600 !important;
    margin-top: 1px !important;
}

/* Scrollbar */
.tvp-wrap .tvp-sidebar::-webkit-scrollbar { width: 5px; }
.tvp-wrap .tvp-sidebar::-webkit-scrollbar-track { background: transparent; }
.tvp-wrap .tvp-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
.tvp-wrap .tvp-sidebar::-webkit-scrollbar-thumb:hover { background: #bbb; }
