/* ═══════════════════════════════════════════════════
   BDT Product Media Manager v3.0.0 — Front-end CSS
   bydigitaltreasures.in
═══════════════════════════════════════════════════ */

.bdt-media-section {
    margin: 14px 0 18px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ════════════════════════════════════════════════════
   PRODUCT SHORT VIDEO — Etsy-style
════════════════════════════════════════════════════ */
.bdt-short-wrap {
    margin-bottom: 12px;
    position: relative;
}

.bdt-short-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 20px;
    padding: 3px 10px;
    margin-bottom: 7px;
}

.bdt-short-thumb {
    position: relative;
    width: 100%;
    /* 9:16 portrait — matches Etsy/Reels style */
    aspect-ratio: 9 / 16;
    max-height: 340px;
    background: #0a0a0a;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
}

.bdt-short-vid {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .3s;
}

/* Overlay shown at rest */
.bdt-short-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.15) 0%,
        rgba(0,0,0,.45) 100%
    );
    transition: opacity .25s;
    pointer-events: none;
}

.bdt-short-play {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #1a1a1a;
    box-shadow: 0 2px 12px rgba(0,0,0,.3);
    transition: transform .2s, background .2s;
    padding-left: 3px; /* optical centre for play icon */
}

.bdt-short-hint {
    font-size: 11.5px;
    color: rgba(255,255,255,.85);
    font-weight: 500;
    letter-spacing: .02em;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* On hover — play video, fade overlay */
.bdt-short-thumb:hover .bdt-short-overlay,
.bdt-short-thumb.is-playing .bdt-short-overlay {
    opacity: 0;
    pointer-events: none;
}
.bdt-short-thumb:hover .bdt-short-play {
    transform: scale(1.1);
    background: #ff4500;
    color: #fff;
}

/* Expand / fullscreen button */
.bdt-short-expand {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,.55);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s, background .15s;
    z-index: 5;
    padding: 0;
}
.bdt-short-thumb:hover .bdt-short-expand { opacity: 1; }
.bdt-short-expand:hover { background: rgba(0,0,0,.8); }

/* Label below video */
.bdt-short-label {
    font-size: 11.5px;
    color: #6b7280;
    text-align: center;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Lightbox ────────────────────────────────────────── */
.bdt-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}
.bdt-lightbox.is-open { display: flex; }

.bdt-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
    cursor: pointer;
}

.bdt-lb-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: min(400px, 90vw);
    width: 100%;
    padding: 0 16px;
}

.bdt-lb-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: rgba(255,255,255,.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.bdt-lb-close:hover { background: rgba(255,255,255,.25); }

.bdt-lb-vid {
    width: 100%;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
}

.bdt-lb-caption {
    font-size: 13px;
    color: rgba(255,255,255,.7);
    text-align: center;
}

/* ════════════════════════════════════════════════════
   YOUTUBE BAR
════════════════════════════════════════════════════ */
.bdt-yt-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 3px solid #dee2e6;
    border-radius: 0 5px 5px 0;
    padding: 7px 12px;
    margin-bottom: 10px;
    font-size: 12.5px;
    color: #495057;
}
.bdt-yt-icon { color: #ff0000; font-size: 11px; }
.bdt-yt-text { color: #6c757d; font-size: 12.5px; }
.bdt-yt-sep  { color: #ced4da; }
.bdt-yt-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    line-height: 1.5;
    text-decoration: none !important;
    transition: opacity .15s;
}
.bdt-yt-pill:hover  { opacity: .8; }
.bdt-yt-promo    { background: #ff0000; color: #fff !important; }
.bdt-yt-tutorial { background: #1a73e8; color: #fff !important; }
.bdt-yt-missing  {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    line-height: 1.5;
    background: #e9ecef;
    color: #adb5bd;
    cursor: default;
    text-decoration: line-through;
}

/* ════════════════════════════════════════════════════
   YOUTUBE THUMBNAILS
════════════════════════════════════════════════════ */
.bdt-video-grid { display: grid; gap: 10px; margin-bottom: 10px; }
.bdt-grid-2 { grid-template-columns: 1fr 1fr; }
.bdt-grid-1 { grid-template-columns: 1fr; max-width: 100%; }

.bdt-video-card {
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 1px 6px rgba(0,0,0,.12);
    transition: box-shadow .2s, transform .2s;
}
.bdt-video-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.2); transform: translateY(-1px); }

.bdt-video-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #111;
}
.bdt-video-thumb img { width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s; }
.bdt-video-thumb:hover img { transform: scale(1.04); }

.bdt-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: rgba(255,255,255,.88);
    text-shadow: 0 2px 12px rgba(0,0,0,.5);
    pointer-events: none;
    transition: color .15s, transform .15s;
}
.bdt-video-thumb:hover .bdt-play { color: #ff0000; transform: scale(1.12); }

.bdt-video-label {
    text-align: center;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 5px 8px;
}
.bdt-label-promo    { background: #ff0000; color: #fff; }
.bdt-label-tutorial { background: #1a73e8; color: #fff; }

/* ════════════════════════════════════════════════════
   METRICS — compact single-line strip
════════════════════════════════════════════════════ */
.bdt-metrics {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 2px;
}

.bdt-metric {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 6px;
    line-height: 1;
}

.bdt-mv { border-left: 3px solid #2271b1; }
.bdt-mb { border-left: 3px solid #1a7f3c; }
.bdt-mc { border-left: 3px solid #c07000; }

.bdt-mi { font-size: 12px; opacity: .65; }

.bdt-mn {
    font-size: 13px;
    font-weight: 700;
    color: #1d2327;
}
.bdt-mv .bdt-mn { color: #2271b1; }
.bdt-mb .bdt-mn { color: #1a7f3c; }
.bdt-mc .bdt-mn { color: #856404; }

.bdt-ml {
    font-size: 11.5px;
    color: #6c757d;
    font-weight: 400;
}

.bdt-sep {
    width: 1px;
    height: 18px;
    background: #dee2e6;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .bdt-grid-2 { grid-template-columns: 1fr; }
    .bdt-short-thumb { max-height: 260px; }
    .bdt-mn { font-size: 12px; }
    .bdt-ml { font-size: 10.5px; }
}
