/* ======================================================
   VIDEO LINKS – DARK THEME (FULL CSS)
   - Header + actions (right aligned; equal width; nowrap)
   - Platform filters (pills)
   - Card list (drag state)
   - Centered modal
   - Icon dropdown
   - Form inputs
   - LIST: black logo thumbnails (320x180)
   - MODAL: real embed inside 320x180 viewport
   - Link button
   - Alerts (comfortable height) + Responsive
====================================================== */

/* ---------- Header ---------- */
.tv-header{
  border-bottom:1px solid #333;
  padding-bottom:10px;
  margin-bottom:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.tv-title{color:#fff;font-weight:600;font-size:1.05rem;letter-spacing:.3px}
.tv-subtext{color:#aaa;font-size:13px}

/* ---------- Top Actions (equal width, right aligned, nowrap) ---------- */
.tv-top-actions{
  display:flex;
  gap:10px;                 /* spacing between buttons */
  justify-content:flex-end; /* right align */
  flex-wrap:nowrap;         /* keep on one line */
}
.tv-top-actions .btn{
  background:transparent;border:1px solid #444;color:#fff;border-radius:25px;
  font-size:14px;transition:all .25s;
  display:inline-flex;align-items:center;justify-content:center;
  min-width:160px;          /* equal width desktop */
  white-space:nowrap;       /* prevent wrap ("Save Order") */
  padding:8px 14px;
  text-align:center;
}
.tv-top-actions .btn i{font-size:15px;margin-right:4px}
.tv-top-actions .btn:hover{background:#d90404;border-color:#d90404;color:#fff}

/* ---------- Platform Filters ---------- */
.tv-filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px}
.tv-filters .tv-filter{
  background:#141414;border:1px solid #2f2f2f;color:#e7e7e7;
  padding:6px 10px;border-radius:999px;font-size:13px;line-height:1;
  transition:all .2s;display:flex;align-items:center;gap:6px
}
.tv-filters .tv-filter:hover{background:#1f1f1f;border-color:#3a3a3a}
.tv-filters .tv-filter.active{background:#d90404;border-color:#d90404;color:#fff}
.tv-filters .tv-filter i{font-size:16px}

/* ---------- List / Item Card ---------- */
.tv-item{
  background:linear-gradient(145deg,#121212,#1b1b1b);color:#fff;border:1px solid #222;
  border-radius:10px;margin-bottom:10px;transition:all .25s;padding:12px 15px
}
.tv-item:hover{border-color:#d90404;transform:translateY(-3px)}
.tv-item.dragging{opacity:.6;background:#181818;border:1px dashed #d90404;cursor:grabbing}
.tv-head{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:10px}
.tv-info{flex:1;min-width:60%}
.tv-title-text{font-weight:600;font-size:15px;color:#fff;margin-bottom:6px;display:flex;align-items:center;gap:6px}
.tv-desc{font-size:13px;color:#aaa;white-space:pre-line;word-break:break-word}

/* Item actions */
.tv-icons{display:flex;gap:6px}
.tv-icons button{
  background:#222;border:1px solid #333;color:#fff;width:36px;height:36px;border-radius:8px;
  display:flex;align-items:center;justify-content:center;transition:all .2s
}
.tv-icons button:hover{background:#d90404;border-color:#d90404;color:#fff}

/* ---------- “Go to Link” Button ---------- */
.tv-link-btn{
  border:1px solid #444;color:#fff;background:#1a1a1a;border-radius:8px;
  padding:6px 10px;font-size:13px;white-space:nowrap;text-decoration:none
}
.tv-link-btn:hover{background:#d90404;border-color:#d90404;color:#fff}

/* ---------- LIST: Black Logo Thumbnails (16:9 – 320x180) ---------- */
.tv-thumb{width:320px}
.tv-thumb-box{
  width:320px;height:180px;border-radius:10px;overflow:hidden;background:#0b0b0b;
  display:flex;align-items:center;justify-content:center;border:1px solid #222
}
.tv-thumb-generic{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;
  font-size:42px;color:#fff;opacity:.9
}

/* ---------- Modal (centered) ---------- */
.modal-dialog{
  position:fixed;top:50% !important;left:50% !important;transform:translate(-50%,-50%) !important;
  margin:0 !important;max-width:500px;width:90%;z-index:1055
}
.modal-content{background:#111;color:#fff;border-radius:10px;border:1px solid #333;box-shadow:0 0 30px rgba(0,0,0,.85)}
.modal-header{border-bottom:1px solid #222;background:linear-gradient(145deg,#161616,#0e0e0e)}
.modal-title{font-weight:600;color:#fff}
.modal-footer{border-top:1px solid #222}

/* Buttons in modal */
.btn-dark{background:#333;border:none;padding:8px 16px;border-radius:8px}
.btn-dark:hover{background:#444}
.tv-btn-save{background:#d90404;color:#fff;border:none;padding:8px 18px;border-radius:8px;font-weight:500;transition:all .2s}
.tv-btn-save:hover{background:#a30303;transform:translateY(-1px)}

/* ---------- Form Inputs ---------- */
.tv-input{
  background:#1a1a1a;border:1px solid #333;color:#fff;font-size:14px;border-radius:6px;transition:all .2s
}
.tv-input:focus{border-color:#d90404;box-shadow:0 0 0 .2rem rgba(217,4,4,.25)}
.tv-input::placeholder{color:#666}

/* ---------- Icon Dropdown ---------- */
.tv-dropdown{
  background:#1a1a1a;border:1px solid #333;color:#fff;border-radius:6px;
  padding:8px 12px;font-size:14px;text-align:left
}
.tv-dropdown:hover,.tv-dropdown:focus{border-color:#d90404;background:#202020}
.tv-dropdown i{font-size:16px;color:#fff}
.tv-dropdown-menu{
  background:#111;border:1px solid #333;border-radius:6px;padding:4px 0;
  margin-top:6px !important;width:100%;z-index:9999;
  top:calc(100% + 6px) !important;left:0 !important;right:0 !important;transform:none !important
}
.tv-dropdown-menu .dropdown-item{
  color:#fff;font-size:14px;display:flex;align-items:center;gap:6px;
  padding:8px 12px;cursor:pointer;transition:background .15s
}
.tv-dropdown-menu .dropdown-item:hover{background:#d90404;color:#fff}
.tv-dropdown-menu i{font-size:16px;color:#fff !important}

/* ---------- MODAL: Real-embed viewport (fixed 320x180) ---------- */
.tv-preview{margin-top:4px}
.tv-preview-box{
  width:320px;height:180px;border-radius:10px;overflow:hidden;border:1px solid #222;background:#000
}
.tv-preview-box iframe,.tv-preview-box video{width:100%;height:100%;border:0;display:block;border-radius:10px}
.tv-preview-fallback{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;
  color:#bbb;font-size:12px;background:#0b0b0b
}

/* ---------- Alerts (comfortable height & alignment) ---------- */
#tvAlertBox .alert{
  margin-top:12px;margin-bottom:12px;border-radius:10px;
  padding:14px 16px;font-size:14px;line-height:1.35;
  min-height:48px;display:flex;align-items:center;gap:12px;
}
#tvAlertBox .alert .btn-close{
  margin-left:auto;filter:invert(1);opacity:.75;
}
#tvAlertBox .alert .btn-close:hover{opacity:1}
#tvAlertBox .alert-success{
  background:#153a2a;color:#d7f7e5;border-color:#1f5f49;
}
#tvAlertBox .alert-danger{
  background:#3a1515;color:#ffd9d9;border-color:#5f1f1f;
}

/* ---------- Responsive ---------- */
@media (max-width:768px){
  .tv-title{font-size:15px}
  .tv-header{align-items:flex-start}
  .tv-top-actions{
    margin-left:auto;
    flex-direction:column;   /* stack vertically */
    align-items:flex-end;    /* right align when stacked */
    gap:8px;
  }
  .tv-top-actions .btn{
    width:160px;            /* equal width on mobile too */
  }
  .tv-icons button{width:32px;height:32px;font-size:13px}
  .modal-dialog{max-width:90%}
  .tv-thumb,.tv-thumb-box{width:100%;max-width:320px}
  .tv-preview-box{width:100%;max-width:320px}
}
