/* vidma UI */
:root{
  --btn-blue:#007aff;
  --btn-blue-hover:#006fe6;
  --border:#e5e7eb;
  --bg:#f3f4f6;
  --panel:#fff;
  --text:#111827;
  --muted:#6b7280;
  --link:#1d4ed8;
}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font-family:"Open Sans",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}

.wrap{max-width:1180px;margin:0 auto;padding:0 18px}

.topbar{background:var(--panel);border-bottom:1px solid var(--border)}
.topbar__inner{height:54px;display:flex;align-items:center;justify-content:space-between}
.brand{display:inline-flex;align-items:center;gap:10px;color:var(--text);text-decoration:none}
.brand__mark{width:26px;height:26px;border-radius:50%;border:2px solid #111827;display:grid;place-items:center;font-weight:700}
.brand__name{font-weight:600;font-size:18px;letter-spacing:.2px}
.topbar__right{display:flex;align-items:center;gap:14px}
.topbar__link{color:var(--text);text-decoration:none;font-weight:600;font-size:13px;opacity:.85}
.topbar__link:hover{opacity:1}

.uploadbar{background:var(--panel);border-bottom:1px solid var(--border)}
.uploadbar__inner{height:62px;display:flex;align-items:center;gap:16px}

.btn-talkz{
  appearance:none;border:0;background:var(--btn-blue);color:#fff;
  height:36px;padding:0 18px;border-radius:6px;
  font-size:16px;font-weight:600;display:inline-flex;align-items:center;gap:10px;
  cursor:pointer;user-select:none;
  transition:background-color .15s ease, transform .05s ease
}
.btn-talkz:hover{background:var(--btn-blue-hover)}
.btn-talkz:active{transform:translateY(1px)}
.btn-talkz i{font-size:18px;line-height:1}

.sharebox{flex:1;display:flex;align-items:center;gap:10px}
.sharebox__group{flex:1;display:flex;align-items:center;border:1px solid var(--border);border-radius:3px;overflow:hidden;background:#fff}
.sharebox__input{
  flex:1;min-width:0;
  width:auto;height:36px;border:0;outline:none;padding:0 12px;font-size:14px;color:#111827
}
.sharebox__btn{
  height:36px;border:0;background:#f9fafb;border-left:1px solid var(--border);
  padding:0 14px;font-weight:600;font-size:13px;cursor:pointer
}
.sharebox__btn:hover{background:#f3f4f6}

/* Copy button: show "Copied" without breaking responsive labels */
#copyShareLink.is-copied .label-copied{display:inline !important;}
#copyShareLink.is-copied .label-copy-mobile,
#copyShareLink.is-copied .label-copy-desktop{display:none !important;}

/* Responsive copy label (we don't ship Bootstrap utilities) */
.copylabel--mobile{display:none}
.copylabel--desktop{display:inline}

@media (max-width: 520px){
  .copylabel--mobile{display:inline}
  .copylabel--desktop{display:none}
  .sharebox__btn{padding:0 10px;font-size:12px}
}

/* Left icon button inside the share link input group */
.sharebox__btn--left{
  border-left:0;
  border-right:1px solid var(--border);
  background:var(--btn-blue);
  color:#fff;
  padding:0 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.sharebox__btn--left:hover{background:var(--btn-blue-hover)}
.sharebox__btn--left i{color:#fff;font-size:16px;line-height:1}

.sharebox__icon{
  height:40px;
  width:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  background:transparent;
  border-right:1px solid var(--border);
  cursor:pointer;
  color:#111827;
}
.sharebox__icon:hover{background:#f3f4f6}
.sharebox__icon:disabled{opacity:.6;cursor:default}
.sharebox__iconSvg{display:block}

.subbar{background:var(--panel)}
.subbar__inner{height:54px;display:flex;align-items:center;justify-content:space-between}
.subbar__left,.subbar__right{display:inline-flex;align-items:center;gap:10px;color:var(--text);font-weight:600;font-size:13px}
.subbar__right{opacity:.8}

.main{padding:26px 0 60px}
.welcome{text-align:center;margin-top:10px}
.welcome h1{margin:0 0 10px;font-size:44px;font-weight:400;color:var(--muted)}
.welcome p{margin:0;color:var(--muted);font-size:15px}

.grid{margin-top:22px;display:grid;grid-template-columns:repeat(3, 1fr);gap:16px;align-items:start}
@media(max-width: 980px){.grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width: 650px){.grid{grid-template-columns:1fr}}

.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px; /* more rounded like your reference */
  overflow:hidden;
}
.thumb{
  width:100%;aspect-ratio:16/9;background:#0b1220;
  background-size:cover;background-position:center;
  position:relative;
}
.thumb__views{
  position:absolute;top:8px;right:8px;
  color:#fff;font-size:12px;font-weight:600;
  background:rgba(0,0,0,.35);padding:4px 8px;border-radius:999px
}

.thumb__uploaded{
  position:absolute;bottom:8px;left:8px;
  color:#fff;font-size:12px;font-weight:700;
  background:rgba(0,0,0,.45);
  padding:4px 10px;border-radius:999px;
  display:inline-flex;align-items:center;gap:6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events:none;
}
.thumb__uploaded i{font-size:14px;line-height:1}

.card__body{padding:12px}
.titleline{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.card__title{font-weight:600;font-size:14px;line-height:1.25;margin:0}
.copylink-mini{
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
 /* icon closer to label */
  padding: 4px 10px;
  border-radius: 10px;
  color: #111827;
  opacity: .78;
}
.copylink-mini i{
  font-size: 14px;
  line-height: 1;
}
.copylink-mini.is-copied{
  background: #0d6efd;
  color: #fff;
  opacity: 1;
}
.copylink-mini.is-copied i{
  color: #fff;
}
.copylink-mini:hover{opacity:1}
.card__link{display:inline-flex;align-items:center;gap:6px;margin-top:6px;color:var(--link);font-size:12px;text-decoration:none}
.card__link:hover{text-decoration:underline}

.actions{display:flex;align-items:center;border-top:1px solid var(--border)}
.action-btn{
  flex:1;border:0;background:#fff;padding:10px 8px;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-size:13px;font-weight:600;color:#6b7280;opacity:.7;cursor:pointer
}
.action-btn:hover{background:#f9fafb;color:#111827;opacity:1}
.action-btn i{font-size:14px}
.action-btn.more{position:relative}

.footer{
  border-top:1px solid var(--border);
  background:#f7f7f7;
  padding:18px 0;
}
.footer__links{
  display:flex;gap:22px;justify-content:center;flex-wrap:wrap;
}
.footer__links a{
  color:#6b7280;text-decoration:none;font-size:12px;opacity:.7;
}
.footer__links a:hover{color:#000;opacity:1}

.alert-red{
  background:#fee2e2;color:#991b1b;border:1px solid #fecaca;
  padding:10px 12px;border-radius:8px;font-size:13px;margin:12px 0;
}

.drop-hint{
  position:fixed;inset:0;display:none;place-items:center;
  /* Dark translucent overlay like Streamable */
  background:rgba(0,0,0,.55);
  backdrop-filter: blur(1px);
  z-index:5000;
}
.drop-hint__box{
  background:transparent;
  border:0;
  border-radius:0;
  padding:0;
  box-shadow:none;
  font-weight:800;
  font-size:56px;
  line-height:1.05;
  letter-spacing:-0.02em;
  color:#fff;
  text-align:center;
  text-shadow:0 10px 30px rgba(0,0,0,.45);
}
.drop-hint.show{display:grid}

.uploading-center{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:14px}
.uploading-text{color:#fff;font-weight:600;margin-bottom:10px}
.actions-uploading .action-btn{flex:1}
.uploading-card .thumb{display:grid;place-items:center;color:#fff}
.progresswrap{margin-top:10px;background:#e5e7eb;border-radius:999px;overflow:hidden;height:8px}
.progressbar{height:8px;background:var(--btn-blue);width:0%}

.modal .btn-talkz{height:34px;font-size:14px}
.small-muted{font-size:12px;color:#6b7280}

.playerwrap{
  max-width:980px;margin:20px auto 0;background:#fff;border:1px solid var(--border);border-radius:4px;overflow:hidden;
}
.player{
  width:100%;aspect-ratio:16/9;background:#000;
  display:flex;align-items:center;justify-content:center;
}
.player video{width:100%;height:100%;object-fit:contain;background:#000}
.player-meta{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 12px;border-top:1px solid var(--border);font-size:12px;color:#6b7280
}
.player-title{
  padding:12px;font-weight:600;font-size:16px
}
.ads{display:none}
@media(min-width: 768px){.ads.desktop{display:block}}
@media(max-width: 767px){.ads.mobile{display:block}}
.ad-slot{display:grid;place-items:center;border:1px dashed #cbd5e1;background:#fff;color:#64748b;margin:12px auto;padding:8px;border-radius:4px}
.ad-728{width:728px;max-width:100%;height:90px}
.ad-300{width:300px;max-width:100%;height:250px}

.pagination{
  display:flex;justify-content:center;gap:8px;margin-top:22px
}
.pagebtn{
  border:1px solid var(--border);background:#fff;border-radius:6px;
  padding:8px 10px;font-size:13px;cursor:pointer
}
.pagebtn:hover{background:#f9fafb}
.pagebtn.active{background:#111827;color:#fff;border-color:#111827}



/* Link line: URL + Copy Link on same row */
.linkline{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;min-width:0}
.card__link{
  color: var(--btn-blue);
  text-decoration:none;
  font-size: 13px;
  display:block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__link:hover{
  text-decoration:underline;
}
.copylink-mini{
  color:#6b7280;
  font-weight:600;
  cursor:pointer;
  font-size: 13px;
}
.copylink-mini:hover{ color:#111827; }

/* Hide removed subbar if present in cache */
.subbar{ display:none !important; }



/* ===== Header layout to match vidma-style capture ===== */
.topbar{
  background: transparent;
  border-bottom: 0;
  padding: 10px 0 6px;
}
.topbar__inner{
  height: auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.uploadbar{
  background: transparent;
  border-bottom: 0;
  padding: 10px 0 16px;
}
.uploadbar__inner{
  height: auto;
  background: #ffffff;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  display:flex;
  align-items:center;
  gap: 14px;
}

.btn-talkz{
  height: 40px;
  padding: 0 18px;
  border-radius: 4px;
  font-size: 14px;
}
.sharebox__group{border-radius:4px}
.sharebox__input{height:40px;font-size:14px}
.sharebox__btn{height:40px;padding:0 14px}

/* Mobile: show "Upload" instead of "Upload video" */
.btn-upload .btn-text-short{display:none}
@media (max-width: 767px){
  .btn-upload .btn-text-full{display:none}
  .btn-upload .btn-text-short{display:inline}
  .uploadbar__inner{padding:10px 10px;gap:10px}
  .btn-talkz{padding:0 12px}
}

/* Mobile home: stack upload button full width, link + copy underneath */
@media (max-width: 767px){
  .uploadbar__inner{
    flex-direction: column;
    align-items: stretch;
  }
  #uploadBtn{
    width: 100%;
    justify-content: center;
  }
  .sharebox,
  .sharebox__group{
    width: 100%;
  }
}


/* Fix: show only one label depending on device */
.btn-upload .btn-text-full{display:inline !important;}
.btn-upload .btn-text-short{display:none !important;}
@media (max-width: 767px){
  .btn-upload .btn-text-full{display:none !important;}
  .btn-upload .btn-text-short{display:inline !important;}
}

/* Reduce vertical gap between header area and video listing */
.uploadbar{padding-bottom: 8px !important;}
/* common wrappers used in this project */
.videos-grid, .videos, .listing, .listing-wrap, .cards, .container-list{
  margin-top: 8px !important;
}



/* ===== Uploading card: thumbnail + dark overlay + progress like capture ===== */
.uploading-card .thumb{
  position: relative;
  overflow: hidden;
  background: #0b1220;
}
.uploading-card .thumb-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.uploading-card .uploading-overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 14px;
}
.uploading-card .uploading-text{
  color:#fff;
  font-weight:600;
  font-size: 14px;
}
.uploading-card .progresswrap{
  width: 49%;
  max-width: 200px;
  height: 28px;
  background: rgba(255,255,255,.25);
  border: 2px solid rgba(255,255,255,1);
  border-radius: 4px;
  overflow:hidden;
}

.uploading-card .progressbar{
  height: 100%;
  background: #ffffff;
  width: 2%;
}


/* ===== Copy Link mini: smaller, not bold, with link icon ===== */
.copylink-mini{
  font-weight: 400 !important;
  font-size: 12px !important;
  color: rgba(116,132,144,.9) !important;
  cursor: pointer;
  white-space: nowrap;
}
.copylink-mini i{
  font-size: 14px;
  margin-right: 4px;
  vertical-align: -1px;
  color: rgba(116,132,144,.75);
}
.copylink-mini:hover{
  color: #111827 !important;
}
.copylink-mini:hover i{
  color: rgba(17,24,39,.75);
}

/* Header copy button (share link) smaller + not bold */
.sharebox__btn{
  font-weight: 400 !important;
  font-size: 12px !important;
}



/* ===== More dropdown (match capture 2) ===== */
.dropdown-menu{
  border: 1px solid rgba(0,0,0,.14) !important;
  border-radius: 3px !important;
  box-shadow: 0 4px 10px rgba(0,0,0,.12) !important;
  padding: 6px 0 !important;
  min-width: 220px;
  font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
}
.dropdown-menu .dropdown-item{
  display:flex !important;
  align-items:center;
  gap: 10px;
  padding: 9px 14px !important;
  font-size: 14px;
  font-weight: 400;
  color: rgba(116,132,144,.95) !important; /* same feel as capture */
  background: transparent !important;
}
.dropdown-menu .dropdown-item i{
  font-size: 16px;
  color: rgba(116,132,144,.78) !important;
  width: 18px;
  text-align:center;
}
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus{
  background: transparent !important;
  color: rgba(60,72,90,.95) !important; /* darker on hover */
}
.dropdown-menu .dropdown-item:hover i,
.dropdown-menu .dropdown-item:focus i{
  color: rgba(60,72,90,.85) !important;
}
.dropdown-menu .dropdown-item:active{
  background: rgba(229,231,235,.35) !important;
  color: rgba(60,72,90,.95) !important;
}
.dropdown-menu .dropdown-divider{
  margin: 6px 0 !important;
  border-top: 1px solid rgba(0,0,0,.10) !important;
}
/* Delete should NOT be red in this style */
.dropdown-menu .dropdown-item.text-danger{
  color: rgba(116,132,144,.95) !important;
}
.dropdown-menu .dropdown-item.text-danger i{
  color: rgba(116,132,144,.78) !important;
}



/* ===== Dropdown visibility fix (was getting clipped/hidden) ===== */
.dropdown-menu{ z-index: 3000 !important; }
.dropdown-menu.show{ display:block !important; }

/* If cards/containers clip overflow, dropdown can look like it doesn't open */
.video-card, .card{ overflow: visible !important; position: relative; }
/* Keep rounded crop only on the thumbnail area */
.video-card .thumb, .card .thumb{ overflow:hidden !important; }



/* ===== More dropdown: refined spacing/weight to match capture ===== */
.dropdown-menu{
  min-width: 190px !important;
  padding: 6px 0 !important;
}
.dropdown-menu .dropdown-item{
  font-size: 13px !important;
  font-weight: 600 !important; /* slightly bold like capture */
  padding: 8px 12px !important;
  gap: 8px !important;
  line-height: 1.2 !important;
}
.dropdown-menu .dropdown-item i{
  font-size: 15px !important;
  width: 16px !important;
  margin-right: 0 !important;
}
.dropdown-menu .dropdown-divider{
  margin: 6px 0 !important;
}

/* ===== Welcome -> Dropzone (Streamable-like) ===== */
.welcome-dropzone-wrap{
  max-width: 780px;
  margin: 40px auto 0;
  padding: 0 16px;
}
.welcome-dropzone{
  width: 100%;
  min-height: 230px;
  border: 2px dashed rgba(0,0,0,.18);
  border-radius: 10px;
  background: rgba(255,255,255,.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(0,0,0,.55);
  cursor: pointer;
  user-select: none;
}
html.theme-dark .welcome-dropzone{
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.70);
}
.welcome-dropzone__icon{
  margin-bottom: 10px;
  opacity: .75;
}
.welcome-dropzone__title{
  font-weight: 600;
  font-size: 18px;
  line-height: 1.15;
  margin: 0;
}
.welcome-dropzone__sub{
  font-size: 14px;
  opacity: .75;
  margin-top: 4px;
}
.welcome-dropzone:active{ transform: translateY(1px); }
.welcome-dropzone.is-drag{
  border-color: rgba(59,130,246,.65);
  background: rgba(59,130,246,.08);
}
html.theme-dark .welcome-dropzone.is-drag{
  border-color: rgba(59,130,246,.85);
  background: rgba(59,130,246,.12);
}
.welcome-dropzone:focus{ outline: none; }
.welcome-dropzone:focus-visible{
  outline: 2px solid rgba(59,130,246,.55);
  outline-offset: 3px;
}

@media (max-width: 767px){
  .welcome-dropzone-wrap{ margin-top: 22px; }
  .welcome-dropzone{ min-height: 200px; }
}

/* ===== Thumbnail picker (Edit thumbnail) ===== */
.thumb-picker{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.thumb-picker__hint{
  font-size: 13px;
  color: rgba(60,72,90,.78);
  line-height: 1.45;
}
html.theme-dark .thumb-picker__hint{
  color: rgba(255,255,255,.72);
}
.thumb-picker__status{
  font-size: 13px;
  color: rgba(60,72,90,.85);
}
html.theme-dark .thumb-picker__status{
  color: rgba(255,255,255,.82);
}
.thumb-picker__grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 767px){
  .thumb-picker__grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.thumb-choice{
  appearance:none;
  border: 2px solid rgba(0,0,0,.14);
  background: #fff;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .08s ease, border-color .12s ease, box-shadow .12s ease;
  aspect-ratio: 16 / 9;
  display:block;
}
.thumb-choice img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.thumb-choice:hover{
  border-color: rgba(60,72,90,.30);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.thumb-choice:active{ transform: translateY(1px); }
.thumb-choice.is-active{
  border-color: rgba(59,130,246,.85);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}
html.theme-dark .thumb-choice{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.18);
}
html.theme-dark .thumb-choice:hover{
  border-color: rgba(255,255,255,.28);
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}
html.theme-dark .thumb-choice.is-active{
  border-color: rgba(96,165,250,.92);
  box-shadow: 0 0 0 3px rgba(96,165,250,.22);
}
.thumb-picker__divider{
  height: 1px;
  background: rgba(0,0,0,.10);
}
html.theme-dark .thumb-picker__divider{
  background: rgba(255,255,255,.12);
}
.thumb-picker__fallbackText{
  font-size: 13px;
  color: rgba(60,72,90,.78);
  margin-bottom: 6px;
}
html.theme-dark .thumb-picker__fallbackText{
  color: rgba(255,255,255,.72);
}
.thumb-picker__fallbackRow{
  display:flex;
  gap: 10px;
  align-items:center;
}
.thumb-picker__fallbackRow .form-control{
  flex: 1 1 auto;
}


/* QR code white frame (share dialog) */
.qr-imgwrap{background:#fff!important;padding:14px!important;border-radius:14px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;box-shadow:0 10px 28px rgba(0,0,0,.35)!important}
#shareQrImg{display:block!important;background:transparent!important}

/* Video status badges (member list) */
.thumb__badge{
  position:absolute;
  top:8px;
  left:8px;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  letter-spacing:0.2px;
  background:rgba(0,0,0,0.55);
  color:#fff;
  backdrop-filter: blur(2px);
}
.thumb__badge--processing{ background:rgba(0,0,0,0.55); }
.thumb__badge--error{ background:rgba(140,0,0,0.65); }

html.theme-dark .sharebox__icon{color:#ffffff}
html.theme-dark .sharebox__icon:hover{background:rgba(255,255,255,0.06)}
