
/* ===== VCM Timeline (maker) ===== */

/* The timeline bar itself */
.vc-timeline {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;

  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Each timeline item (wrapper around the card) */
.vc-tl-clip {
  flex: 0 0 140px;      /* <- THIS keeps the nice square-ish width */
  display: flex;
}

/* Make sure Bootstrap doesn't force 100% width or shrink weirdly */
.vc-timeline .vc-tl-clip {
  width: auto !important;
}

/* Timeline card inside each item */
.vc-timeline .clip-card {
  width: 100% !important;  /* fill that 140px cell */
  max-width: 140px;
  font-size: 0.8rem;
  padding: 0.4rem 0.5rem;
}

@media (max-width: 1200px) {
  .btn-ws-to-timeline {
    font-size: 0.7rem;
	padding: 2px;
  }
}


/* Optional: look similar to before */
.vc-timeline .clip-card {
  border-radius: 0.5rem;
  background: rgba(var(--background-color-rgb), 0.04);
}
.vc-timeline {
  cursor: grab;
}
.vc-timeline.is-dragging {
  cursor: grabbing;
}
/* Flying ghost from workspace to timeline */
.vc-fly-ghost {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  border-radius: 0.75rem;
  overflow: hidden;
  transition:
    transform 0.6s ease-out,
    opacity 0.6s ease-out;
}
/* Shake / bump animation for Add-to-Timeline button */
@keyframes vcm-button-bump {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-4px); }
  60%  { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

.vcm-bump {
  animation: vcm-button-bump 0.25s ease-out;
}

/* =========================
   WORKSPACE (VC MAKER)
   ========================= */

.vc-maker .workspace-container{
  display:flex;
  flex-wrap:wrap;
  gap:0.5rem;
  align-items:stretch;
}

/* --- Default (xl/desktop) ---
   5 tiles per row (20%)
*/
.vc-maker .workspace-item{
  flex:0 0 calc(20% - 0.5rem);
  min-width: 180px;      /* prevents silly skinny tiles */
}

/* Tile: keep it square */
.vc-maker .workspace-item .clip-card{
  display:flex;
  flex-direction:column;
  aspect-ratio: 1 / 1;   /* square */
  width:100%;
  overflow:hidden;       /* keeps it tidy when narrow */
}

/* Optional: allow a bit of internal breathing room */
.vc-maker .workspace-item .clip-card{
  padding:0.6rem;        /* adjust to taste */
}

/* Ensure bottom button row stays at bottom */
.vc-maker .workspace-item .btn-ws-remove{
  margin-left:auto;
}
.btn-ws-remove{
  margin-top:5px !important;
  max-height:28px;
}
/* Keep the bottom button row anchored */
.vc-maker .workspace-item .clip-card .d-flex.gap-1.mt-2{
  margin-top:auto;
}

/* Slightly tighter default buttons */
.vc-maker .workspace-item .btn{
  font-size:0.8rem;
  padding:0.25rem 0.5rem;
  line-height:1.1;
}

/* Don’t let "Add To Timeline" wrap unless you want it to */
.vc-maker .workspace-item .btn-ws-to-timeline{
  white-space:nowrap;
}

/* =========================
   BREAKPOINTS
   ========================= */

/* < 1200px (lg and down): 4 per row */
@media (max-width:1199.98px){
  .vc-maker .workspace-item{
    flex:0 0 calc(25% - 0.5rem);
    min-width:160px;
  }
}

/* < 992px (md and down): 3 per row */
@media (max-width:991.98px){
  .vc-maker .workspace-item{
    flex:0 0 calc(33.333% - 0.5rem);
    min-width:150px;
  }

  .vc-maker .workspace-item .btn{
    font-size:0.75rem;
    padding:0.22rem 0.45rem;
  }
}

/* < 768px (sm-ish): 2 per row */
@media (max-width:767.98px){
  .vc-maker .workspace-item{
    flex:0 0 calc(50% - 0.5rem);
    min-width:0; /* let flexbox shrink */
  }

  /* Header row: allow wrapping */
  .vc-maker .workspace-item .clip-card > .d-flex:first-child{
    flex-wrap:wrap;
    row-gap:0.25rem;
  }

  .vc-maker .workspace-item .small-label{
    font-size:0.72rem;
  }

  .vc-maker .workspace-item .btn-ws-load{
    margin-left:auto;
    font-size:0.7rem;
    padding:0.18rem 0.4rem;
    white-space:nowrap;
  }
}

/* < 576px (xs phones): still 2 per row, but tighter type */
@media (max-width:575.98px){
  .vc-maker .workspace-item .clip-card{
    padding:0.5rem;
  }

  .vc-maker .workspace-item .fw-bold.small{
    font-size:0.72rem;
  }

  .vc-maker .workspace-item .small{
    font-size:0.68rem;
  }

  .vc-maker .workspace-item .btn{
    font-size:0.68rem;
    padding:0.18rem 0.4rem;
  }
}

/* < 360px (tiny phones): make primary button shorter */
@media (max-width:359.98px){
  .vc-maker .workspace-item .btn-ws-to-timeline{
    font-size:0.64rem;
    padding:0.16rem 0.35rem;
  }
}
@media (max-width:575.98px){
  .vc-maker .workspace-item .clip-card{
    aspect-ratio: auto;   /* stop forcing a square */
    overflow: visible;    /* let it grow naturally */
  }
}



.vc-maker .clip-card {
  aspect-ratio: 1 / 1;
  border-radius: 0.75rem;
  padding: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(
      135deg,
      rgba(255,255,255,0.12),
      rgba(0,0,0,0.35)
  );
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.vc-maker .clip-card:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--accent-color);
  box-shadow: 0 0 8px rgba(0,0,0,0.35);
}

.vc-maker .clip-card.active {
  border: 2px solid var(--accent-color);
  box-shadow: 0 0 0 2px rgba(13,110,253,.4);
}

/* Tiny label inside square */
.vc-maker .clip-time {
  font-size: 0.9rem;
  opacity: 0.7;
}

.vc-maker .small-label {
  font-size: 0.95rem;
  opacity: 0.7;
}

.vc-maker .code-block {
  font-family: monospace;
  font-size: 0.8rem;
  background: var(--vc-code-bg);   /* theme-aware */
  color: var(--vc-code-fg);
  border-radius: 0.5rem;
  padding: 0.5rem;
  white-space: pre;
  max-height: 200px;
  overflow: auto;
}

.controls .btn {
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 2rem;
}
/* Strong border on hover */
.btn-chain-full:hover {
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
  background-color: #ffc107; /* keep Bootstrap's warning color */
}

.controls .btn i {
  font-size: 1.2rem;
  vertical-align: middle;
}

.player-shell {
  background: #000; /* or your brand gradient, if you prefer */
  overflow: hidden;
}

.controls .now-playing {
  font-size: 1rem;
}
@media (max-width: 575.98px) {
  .controls .now-playing {
    font-size: 0.7rem;
  }
}

.player-shell {
  position: relative;
}

.player-shell .player-host,
.player-shell .player-placeholder {
  position: absolute;
  inset: 0;           /* top/right/bottom/left: 0 */
  width: 100%;
  height: 100%;
}

/* Default background if no image */
.player-shell .player-placeholder {
  z-index: 2;
  padding: 1.5rem;
  background: #000;   /* or your existing gradient */
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Add a subtle dark overlay when image is present */
.player-shell .player-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: -1;
}
.chain-overlay {
  pointer-events: none; /* So clicks go through to the link */
}

.video-box img {
  object-fit: cover;
}
/* Make unselected radio borders stronger */
.form-check-input[type="radio"] {
  border: 2px solid color-mix(in srgb, var(--default-color), transparent 40%) !important;
}

/* When hovered, make the circle better defined */
.form-check-input[type="radio"]:hover {
  border-color: color-mix(in srgb, var(--accent-color), transparent 20%) !important;
}

/* When checked, keep original Bootstrap behaviour */
.form-check-input[type="radio"]:checked {
  border-color: var(--accent-color) !important;
  background-color: var(--accent-color) !important;
}

/* === TRANSPORT PILL BUTTONS (COMPACT) === */
.vc-transport-pill {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
}

.vc-pill-btn {
  border: none;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: #fff;
  cursor: pointer;
  transition: 0.15s ease-in-out;
}

.vc-pill-btn i {
  font-size: 1rem;
}

/* Colors */
.vc-prev  { background: #3b82f6; }   /* blue */
.vc-next  { background: #f97316; }   /* orange */
.vc-playpause {
  background: var(--accent-success, #22c55e);
  width: 120px;                       /* prevents button shake */
  justify-content: center;
}

/* Pause state */
.vc-playpause.paused {
  background: #dc2626 !important;    /* red */
}

.vc-pill-btn:hover {
  filter: brightness(1.1);
}

/* === SIZE BUTTONS (ORIGINAL STYLE) === */
.vc-size-group .vc-size-btn {
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 60%);
  background: transparent;
  color: var(--default-color);
}

.vc-size-group .vc-size-btn.active {
  background: color-mix(in srgb, var(--accent-color), transparent 70%);
  border-color: var(--accent-color);
  color: var(--contrast-color);
}

.vc-size-group .vc-size-btn:not(.active):hover {
  background: color-mix(in srgb, var(--accent-color), transparent 90%);
}
/* S / M / L buttons – neat pill shapes on dark background */
.vc-player-controls .vc-size-group {
  display: flex;
  gap: 0.35rem;                 /* space between pills */
}

.vc-player-controls .vc-size-group .vc-size-btn {
  border-radius: 999px !important;  /* force pill shape, ignore btn-group shaping */
  padding: 0.3rem 0.9rem;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;

  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.9);

  transition: 0.15s ease-in-out;
}

/* Active size button */
.vc-player-controls .vc-size-group .vc-size-btn.active {
  background: rgba(255,255,255,0.16);
  border-color: #ffffff;
  color: #ffffff;
}

/* Hover for inactive buttons */
.vc-player-controls .vc-size-group .vc-size-btn:not(.active):hover {
  background: rgba(255,255,255,0.08);
}
#vc-time-inline {
  opacity: 0.75;
  font-weight: 500;
  margin-left: 2px;
}

/* First timeline item = chain entry */
.timeline-item.chain-entry {
  border: 0px solid #ffc107;
}

/* When chain is playing from the start */
.timeline-item.chain-entry.chain-playing {
  border-width: 2px;
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.6);
}

.player-placeholder.title-cover {
  background: radial-gradient(circle at top, #333 0, #000 60%);
  padding: 0.75rem;
}

.vc-title-fit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1.1;
}

.vc-title-fit span {
  display: inline-block;
  word-break: break-word;
  font-size: 40px; /* JS will override */
  color: #fff;
}
.chain-title-thumb {
  background: radial-gradient(circle at top left, #ffdd55, #ff3366 40%, #2b1e63);
  border-radius: 0.75rem;
}

.chain-title-thumb .h4 {
  font-weight: 700;
  letter-spacing: 0.03em;
}
    .play {
      box-shadow: 0 0 0 0 rgba(25,135,84,0.5);
      transition: box-shadow .3s ease-in-out;
    }
    .play:hover {
      box-shadow: 0 0 10px 3px rgba(25,135,84,0.5);
    }
    .pause:hover {
      box-shadow: 0 0 10px 3px rgba(220,53,69,0.5);
    }
	
	.vc-channel-tags {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 0.75rem;
}

.vc-channel-tags .badge {
  font-weight: 500;
  letter-spacing: 0.01em;
}
.vc-text-bg {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.45),
    rgba(0,0,0,0.25)
  );
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  display: inline-block;
}
/* Hide S / M / L player size buttons on very small screens */
@media (max-width: 575.98px) {
  .vc-size-group {
    display: none !important;
  }
}
.vc-maker.light-mode .btn-move-left,
.vc-maker.light-mode .btn-move-right {
  border-color: rgba(0,0,0,0.4) !important;
  color: rgba(0,0,0,0.7) !important;
}
.vc-maker.light-mode .btn-move-left:hover,
.vc-maker.light-mode .btn-move-right:hover {
  background-color: rgba(0,0,0,0.7) !important;
  color: #fff !important;
}
.vc-timeline .btn-move-left,
.vc-timeline .btn-move-right {
  border-color: rgba(0, 0, 0, 0.4) !important;
  color: rgba(255, 255, 255, 0.75) !important;
  background-color: var(--accent-color) !important;
  padding: 3px 6px;
  min-width: 16px;
}
.vc-timeline .btn-move-left:hover,
.vc-timeline .btn-move-right:hover {
  background-color: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
}

.modern-form .form-control,
.modern-form .form-select {
  height: 38px;
  border: 2px solid color-mix(in srgb, var(--default-color), transparent 90%);
  border-radius: 14px;
  background: var(--surface-color);
  color: var(--default-color);
  font-size: 15px;
  padding: 16px 20px;
  transition: all 0.3s ease;
}

.modern-form .form-control:focus,
.modern-form .form-select:focus {
  border-color: var(--accent-color);
  background: var(--surface-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-color), transparent 94%);
  outline: none;
}

.modern-form .form-control::placeholder,
.modern-form .form-select::placeholder {
  color: color-mix(in srgb, var(--default-color), transparent 60%);
}

.modern-form textarea.form-control {
  height: auto !important;
  padding: 16px 20px;
  resize: none;
}

.modern-form .btn-submit {
  width: 100%;
  background: var(--accent-color);
  color: var(--contrast-color);
  border: none;

  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  margin-top: 24px;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent-color), transparent 80%);
}

.modern-form .btn-submit:hover {
  background: color-mix(in srgb, var(--accent-color), #000 10%);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--accent-color), transparent 70%);
}

.modern-form .btn-submit:hover i {
  transform: translateX(4px);
}

.modern-form .btn-submit:active {
  transform: translateY(0);
}

.modern-form .btn-submit i {
  font-size: 18px;
  transition: transform 0.3s ease;
}
/* =========================
   VideoChain Player (chain.php)
   ========================= */

/* Layout shell */
.vc-wrap { max-width: 980px; margin: 0 auto; padding: 14px; }
.vc-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px;
}

/* Tablet: slightly tighter */
@media (max-width: 991.98px){
  .vc-wrap { padding: 10px; }
  .vc-card { padding: 12px; }
}



/* Player box */
.vc-player-box {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

/* Use Bootstrap ratio wrapper */
.player-shell { position: relative; }

/* YT host fills ratio */
.player-host,
.player-host iframe {
  width: 100% !important;
  height: 100% !important;
  display: block;
}


/* Cover overlay (custom/brand/title/yt thumb fallback) */
.vc-cover-overlay{
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;   /* allow click */
  cursor: pointer;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover; /* default: cinematic crop */
}

/* FIT mode (show full image without cropping) */
.vc-player-box.fit-cover .vc-cover-overlay{
  background-size: contain;
  background-color: #000; /* letterbox */
}

/* Title Card styling (gradient comes from inline style) */
.vc-cover-overlay.is-title .vc-cover-inner{
  background: none;
  border: 0;
  padding: 0;
  max-width: 90%;
}

.vc-cover-inner{
  max-width: 720px;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.15);
  text-align: center;
}

.vc-cover-title{
  font-weight: 900;
  line-height: 1.08;
  text-wrap: balance;
  font-size: clamp(20px, 4vw, 34px);
}

.vc-cover-sub{
  margin-top: 10px;
  font-size: clamp(12px, 1.8vw, 18px);
  opacity: .95;
}

/* Controls */
.controls{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 10px;
  backdrop-filter: blur(10px);
}

.controls .btn{
  border-radius: 12px;
  font-weight: 700;
  touch-action: manipulation;
}

.controls .btn-group .btn{ min-width: 44px; }
.btn-fallback-text{ display: none; }

/* FF mobile icon fallback */
.controls .btn i{ pointer-events: none; }
.controls .btn.no-icons i{ display: none !important; }
.controls .btn.no-icons .btn-fallback-text{ display: inline !important; }

/* Timeline */
.vc-timeline{ max-height: 320px; overflow: auto; }
.vc-item{ cursor: pointer; border-radius: 10px; padding: 10px 12px; }
.vc-item:hover{ background: rgba(255,255,255,0.05); }
.vc-item.active{
  border-left: 3px solid rgba(255,193,7,.95);
  background: rgba(255,255,255,0.06) !important;
}

/* Mobile: reduce wasted space */
@media (max-width: 575.98px){
  .vc-wrap{ padding: 0 !important; }
  .vc-card{
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    padding: 10px !important;
    background: transparent !important;
  }
  .vc-player-box{ border-radius: 0 !important; }
  .vc-timeline{ max-height: 240px; }
  .controls .btn{ padding: .45rem .6rem; }
}

/* =========================
   Theater Mode (edge-to-edge, no timeline)
   ========================= */

body.theater-lock{ overflow: hidden; }
body.theater-lock .vc-timeline{ display: none !important; }

.vc-player-box.is-theater{
  position: fixed;
  inset: 0;
  z-index: 1055;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: rgba(0,0,0,.92);
}

/* Optional: If you inject a theater controls bar inside the player box */
.vc-player-box.is-theater .vc-theater-controls{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 6;
  padding: 10px 12px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
}

#vc-player-shell { max-width: 100%; margin-left:auto; margin-right:auto; }

#vc-player-shell.player-size-s { width: 360px; }
#vc-player-shell.player-size-m { width: 640px; }
#vc-player-shell.player-size-l { width: 960px; }

/* mobile: always full width */
@media (max-width: 768px){
  #vc-player-shell.player-size-s,
  #vc-player-shell.player-size-m,
  #vc-player-shell.player-size-l { width: 100%; }
}
.vc-time-value {
  font-size: 0.85rem;   /* small bump */
  font-weight: 600;
  letter-spacing: 0.02em;
}
.vc-nowplaying-text {
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;      /* override monospace */
  letter-spacing: 0.01em;
}

@media (max-width: 575.98px){

  /* The toolbar row: keep everything on one line */
  #vc-edit-panel .d-flex.flex-wrap{
    flex-wrap: nowrap !important;
    gap: .25rem !important;
  }

  /* Shrink the two buttons slightly */
  #btn-edit-watch,
  #btn-edit-preview{
    font-size: .95rem;
    padding: .20rem .35rem;
    line-height: 1;
    white-space: nowrap;
  }

  /* Shrink the switch and prevent its label from wrapping */
  #vc-edit-panel .form-check.form-switch{
    margin-left: .25rem !important; /* overrides ms-2 */
    display: flex;
    align-items: center;
    gap: .25rem;
    white-space: nowrap;
  }

  #vc-edit-panel .form-check.form-switch .form-check-label{
    font-size: .68rem;
    margin: 0;
    white-space: nowrap;
  }

  /* Optional: slightly smaller switch itself */
  #vc-edit-panel .form-check-input{
    transform: scale(.9);
    margin-top: 0;
  }
  #vc-edit-panel #edit-youtube{
  height: 28px;          /* small */
  font-size: .75rem;
  padding-top: 0;
  padding-bottom: 0;
}

}
@media (max-width: 320px){

  /* Stack actions more efficiently */
  .vc-edit-actions{
    gap: .25rem !important;
  }

  /* Shorten + shrink buttons */
  #btn-save-clip{
    font-size: .95rem;
    padding: .18rem .4rem;
    white-space: nowrap;
  }

  #btn-close-editor{
    font-size: .95rem;
    padding: .18rem .35rem;
    white-space: nowrap;
  }

  /* Status always on its own line */
  #edit-status{
    flex-basis: 100%;
    font-size: .92rem;
    line-height: 1.1;
    margin-top: .15rem;
  }
}
@media (max-width:575.98px){
  #vc-edit-panel .vc-edit-toolbar{
    flex-wrap: nowrap !important;
    gap: .25rem !important;
  }
}
.btn-outline-primary {
  --bs-btn-color: var(--accent-color);
  --bs-btn-border-color: var(--accent-color);

}
.vchain-hero-embed .vc-cover-overlay{
  background-size: cover;
  background-position: center;
}
.vchain-hero-embed .vc-cover-inner-embed{
  padding: 1rem;
  text-align: center;
  text-shadow: 0 2px 20px rgba(0,0,0,.45);
}