/* Video Hello builder styles */
:root{
  --vh-bg:#070b16;
  --vh-surface:#10182c;
  --vh-surface-alt:#151f38;
  --vh-border:#1f2a45;
  --vh-text:#e5ecff;
  --vh-text-dim:#7f8db5;
  --vh-accent:#5b7cff;
  --vh-radius:20px;
}

.vh-builder-root{
  margin:-24px auto 40px;
  padding:40px 28px 60px;
  max-width:1280px;
  color:var(--vh-text);
  font-family:'Inter', 'Segoe UI', system-ui, sans-serif;
}

.vh-hero{
  background:linear-gradient(135deg,#1b2440,#0c1124 65%);
  border:1px solid var(--vh-border);
  border-radius:var(--vh-radius);
  padding:28px 32px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:32px;
  margin-bottom:30px;
  box-shadow:0 20px 60px rgba(5,8,20,0.6);
}

.vh-label{
  font-size:13px;
  letter-spacing:.4px;
  text-transform:uppercase;
  color:#9fb4ff;
  margin:0 0 6px;
}

.vh-hero h1{
  margin:0;
  font-size:38px;
}

.vh-lead{
  margin:14px 0 0;
  max-width:720px;
  color:var(--vh-text-dim);
  line-height:1.6;
}

.vh-hero-actions{
  display:flex;
  gap:12px;
}

.vh-btn{
  border:none;
  border-radius:12px;
  padding:12px 18px;
  background:var(--vh-accent);
  color:#fff;
  font-weight:600;
  letter-spacing:.4px;
  cursor:pointer;
  transition:.2s;
  box-shadow:0 8px 18px rgba(66,88,255,0.35);
}

.vh-btn:hover{ transform:translateY(-1px); }
.vh-btn:disabled{ opacity:.45; cursor:not-allowed; }

.vh-btn.secondary{ background:#212d4f; box-shadow:none; }
.vh-btn.ghost{ background:rgba(255,255,255,0.08); box-shadow:none; }

.vh-grid{
  display:grid;
  grid-template-columns: minmax(520px,1fr) minmax(320px,420px);
  gap:26px;
}

.vh-panel{
  background:var(--vh-surface);
  border:1px solid var(--vh-border);
  border-radius:var(--vh-radius);
  padding:24px;
  box-shadow:0 12px 40px rgba(4,6,16,0.55);
}

.vh-section{ display:flex; flex-direction:column; gap:16px; margin-bottom:26px; }
.vh-section:last-child{ margin-bottom:0; }

.vh-section-head h2{ margin:0; font-size:20px; }
.vh-section-head p{ margin:6px 0 0; font-size:13px; color:var(--vh-text-dim); }

.vh-field-grid{
  display:grid;
  gap:16px;
}

.vh-field-grid.two{ grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }

.vh-field-grid label,
label.vh-full{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:13px;
  color:var(--vh-text-dim);
}

.vh-field-grid span,
label.vh-full span{ color:#c2ceff; font-weight:500; }

input[type="text"],
input[type="url"],
input[type="number"],
textarea,
select{
  background:var(--vh-surface-alt);
  border:1px solid var(--vh-border);
  border-radius:12px;
  padding:11px 14px;
  color:var(--vh-text);
  font-size:14px;
  font-family:inherit;
}

textarea{ resize:vertical; }

.vh-upload{
  position:relative;
  border:1px dashed var(--vh-border);
  border-radius:16px;
  background:rgba(255,255,255,0.02);
  padding:26px;
  text-align:center;
}

.vh-upload input{ position:absolute; inset:0; opacity:0; cursor:pointer; }
.vh-upload-inner strong{ display:block; margin-bottom:6px; }
.vh-upload-inner p{ margin:4px 0; color:var(--vh-text-dim); }

label.toggle{
  flex-direction:row;
  align-items:center;
  gap:12px;
}

label.toggle input{ width:20px; height:20px; }

.preview-panel{ padding:24px; display:flex; flex-direction:column; gap:12px; }

.vh-preview-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.vh-preview-summary h2{ margin:0 0 6px; }
.vh-preview-summary p{ margin:0; color:var(--vh-text-dim); }

.vh-preview-hint{ margin:0; font-size:13px; color:var(--vh-text-dim); }

.vh-preview-modal[hidden]{ display:none; }

.vh-preview-modal{
  position:fixed;
  inset:0;
  z-index:999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px 24px;
}

.vh-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(5,7,18,0.82);
  backdrop-filter:blur(8px);
  z-index:0;
}

.vh-modal-dialog{
  position:relative;
  width:min(1200px,100%);
  max-height:calc(100vh - 80px);
  background:var(--vh-surface);
  border:1px solid var(--vh-border);
  border-radius:24px;
  padding:28px;
  box-shadow:0 30px 90px rgba(0,0,0,0.65);
  display:flex;
  flex-direction:column;
  gap:18px;
  z-index:1;
}

body.vh-modal-open{ overflow:hidden; }

.vh-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
  flex-wrap:wrap;
}

.vh-modal-controls{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.vh-modal-close{
  border:none;
  border-radius:10px;
  padding:8px 14px;
  background:rgba(255,255,255,0.08);
  color:#fff;
  cursor:pointer;
}

.vh-modal-body{
  flex:1;
  overflow:auto;
}

.vh-preview-mode-toggle{
  display:flex;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:999px;
  padding:2px;
  gap:4px;
}

.vh-preview-mode-toggle button{
  border:none;
  background:transparent;
  color:var(--vh-text-dim);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.5px;
  padding:6px 14px;
  border-radius:999px;
  cursor:pointer;
}

.vh-preview-mode-toggle button.active{
  background:var(--vh-accent);
  color:#fff;
  box-shadow:0 6px 16px rgba(65,89,255,0.35);
}

.vh-device-toggle button{
  background:rgba(255,255,255,0.06);
  border:1px solid transparent;
  border-radius:999px;
  padding:6px 16px;
  color:var(--vh-text);
  cursor:pointer;
}

.vh-device-toggle button.active{
  background:var(--vh-accent);
  border-color:var(--vh-accent);
}

.vh-preview-canvas{
  position:relative;
  border:1px solid var(--vh-border);
  border-radius:18px;
  padding:32px;
  background:linear-gradient(160deg,#0d1326,#060910);
  min-height:420px;
}

.vh-preview-canvas[data-view="embed"]{
  padding:0;
  background:radial-gradient(circle at top,#0f162d,#050710);
}

.vh-preview-canvas[data-view="embed"] .vh-preview-page,
.vh-preview-canvas[data-view="embed"] .vh-preview-widget{ display:none; }

.vh-preview-canvas[data-view="embed"] .vh-embed-frame-wrapper{ display:block; }

.vh-preview-stage{
  position:relative;
  width:900px;
  max-width:100%;
  margin:0 auto;
  min-height:520px;
}

.vh-preview-canvas[data-mode="mobile"] .vh-preview-stage{
  width:360px;
  min-height:640px;
}

.vh-preview-canvas[data-mode="desktop"] .vh-preview-stage{
  width:900px;
}
.vh-embed-frame-wrapper{
  position:relative;
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.1);
  background:linear-gradient(145deg,rgba(248,248,255,0.04),rgba(0,0,0,0.25));
  min-height:380px;
  display:none;
}

.vh-embed-toolbar{
  position:absolute;
  top:12px;
  right:12px;
  display:flex;
  gap:8px;
  z-index:2;
}

.vh-embed-toolbar button{
  border:none;
  border-radius:10px;
  padding:6px 10px;
  font-size:12px;
  letter-spacing:.4px;
  background:rgba(5,8,22,0.75);
  color:#fff;
  cursor:pointer;
}

.vh-embed-iframe{
  width:100%;
  height:420px;
  border:none;
  background:#fff;
}

.vh-preview-page{
  position:relative;
  border-radius:14px;
  background:#fff;
  min-height:360px;
  padding:20px;
  box-shadow:0 25px 50px rgba(5,9,20,0.45);
}

.vh-preview-canvas[data-mode="mobile"] .vh-preview-card{ width:250px; }
.vh-preview-canvas[data-mode="mobile"] .vh-preview-bubble{ width:64px; height:64px; }

.vh-preview-nav{ height:18px; width:40%; background:#dfe3f4; border-radius:9px; margin-bottom:18px; }

.vh-preview-body{ display:flex; flex-direction:column; gap:12px; }
.vh-preview-block{ height:14px; border-radius:7px; background:#e8ebfa; }
.vh-preview-block.tall{ height:110px; border-radius:16px; }
.vh-preview-block.short{ width:60%; }

.vh-preview-widget{
  position:absolute;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:16px;
  inset:auto;
}

.vh-preview-mini{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 14px 10px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(6,10,24,0.8);
  box-shadow:0 16px 36px rgba(0,0,0,0.45);
  cursor:pointer;
  color:#fff;
}

.vh-preview-mini-thumb{
  width:60px;
  height:60px;
  border-radius:20px;
  background:linear-gradient(145deg,#5b7cff,#8fd3ff);
  position:relative;
  overflow:hidden;
}

.vh-preview-mini-thumb::after{
  content:'';
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.15);
}

.vh-mini-play{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  font-size:16px;
  font-weight:600;
}

.vh-preview-mini-text{ display:flex; flex-direction:column; line-height:1.2; }
.vh-preview-mini-text p{ margin:0; font-weight:600; }
.vh-preview-mini-text span{ font-size:12px; color:var(--vh-text-dim); }

.vh-preview-card{
  width:300px;
  background:rgba(4,8,20,0.96);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:26px;
  padding:14px;
  box-shadow:0 24px 60px rgba(0,0,0,0.65);
  transform-origin:bottom right;
  transition:opacity .25s ease, transform .25s ease;
  position:relative;
}

.vh-preview-widget[data-expanded="false"] .vh-preview-card{
  opacity:0;
  pointer-events:none;
  transform:translateY(16px) scale(0.92);
}

.vh-preview-widget[data-expanded="true"] .vh-preview-mini{ display:none; }
.vh-preview-widget[data-expanded="false"] .vh-preview-close{ display:none; }

.vh-preview-close{
  position:absolute;
  top:12px;
  right:12px;
  border:none;
  border-radius:999px;
  width:30px;
  height:30px;
  background:rgba(0,0,0,0.35);
  color:#fff;
  cursor:pointer;
}

.vh-preview-card video{
  width:100%;
  border-radius:20px;
  background:#000;
  aspect-ratio:9/16;
  object-fit:cover;
  margin-bottom:14px;
}

.vh-preview-widget[data-shape="square"] video{ aspect-ratio:1/1; }
.vh-preview-widget[data-shape="horizontal"] video{ aspect-ratio:16/9; }

.vh-widget-bottom{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.vh-widget-title{ margin:0; font-weight:600; font-size:15px; }
.vh-widget-desc{ margin:2px 0 0; font-size:12px; color:var(--vh-text-dim); }

#vhCTA{
  border:none;
  border-radius:12px;
  padding:10px 12px;
  font-weight:600;
  cursor:pointer;
  background:#ff585d;
  color:#fff;
}

.vh-branding{ font-size:11px; color:var(--vh-text-dim); text-align:center; display:block; }

.vh-preview-canvas[data-mode="mobile"] .vh-preview-page{ width:100%; }

.vh-preview-widget[data-position="bottom-right"]{ right:40px; bottom:40px; }
.vh-preview-widget[data-position="bottom-left"]{ left:40px; bottom:40px; }
.vh-preview-widget[data-position="top-right"]{ right:40px; top:40px; }
.vh-preview-widget[data-position="top-left"]{ left:40px; top:40px; }
.vh-preview-widget[data-position="center"]{ left:50%; top:50%; transform:translate(-50%,-50%); }

.code-panel pre{
  background:#04070f;
  border:1px solid var(--vh-border);
  border-radius:16px;
  padding:18px;
  min-height:160px;
  overflow:auto;
  font-size:12px;
  line-height:1.45;
  color:#ffd9b2;
}

.vh-code-actions{
  margin-top:14px;
  display:flex;
  align-items:center;
  gap:16px;
}

.vh-status{ font-size:13px; color:var(--vh-text-dim); }

@media (max-width:1180px){
  .vh-grid{ grid-template-columns:1fr; }
}

@media (max-width:720px){
  .vh-hero{ flex-direction:column; }
  .vh-builder-root{ padding:30px 16px 50px; margin:0; }
  .vh-panel{ padding:18px; }
}
