/*
 * WebVRDev Studio Design System — Portable theme, inspired by Material Studio v8.5.0
 * Scope all UI under <div class="wvd-studio">...</div>.
 * Does NOT include the app's engine logic, Babylon.js, PBR or Seamless styles.
 * Source reference: ORIGINAL_Material_Studio_v8_5_studio.css
 * Fonts are served by Google Fonts; fallback uses system fonts.
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');

.wvd-studio,
.wvd-studio * { box-sizing: border-box; }

.wvd-studio {
  /* Colors extracted from the v8.5 studio.css */
  --wvd-bg: #202020;
  --wvd-header: #1a1a1a;
  --wvd-panel: #292929;
  --wvd-stage: #242424;
  --wvd-surface: #303030;
  --wvd-card: #333333;
  --wvd-input: #363636;
  --wvd-control: #414141;
  --wvd-border: #424242;
  --wvd-border-strong: #5b5b5b;
  --wvd-text: #dedede;
  --wvd-text-secondary: #adadad;
  --wvd-text-muted: #858585;
  --wvd-accent: #82ceff;    /* Final effective --acc from v8.3+ */
  --wvd-accent-original: #7bc8ff;
  --wvd-accent-soft: #a7ddff;
  --wvd-accent-panel: #263e4d;
  --wvd-blue-button: #347dab;
  --wvd-blue-button-hover: #3f96c5;
  --wvd-positive: #75c9a6; /* Portable status semantic extension */
  --wvd-negative: #e09090; /* Portable status semantic extension */

  --wvd-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wvd-font-code: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --wvd-radius-xs: 3px;
  --wvd-radius: 4px;
  --wvd-radius-lg: 5px;
  --wvd-radius-modal: 8px;
  --wvd-space-1: 4px;
  --wvd-space-2: 8px;
  --wvd-space-3: 12px;
  --wvd-space-4: 16px;
  --wvd-space-5: 24px;
  --wvd-h-header: 46px;
  --wvd-h-tabs: 35px;
  --wvd-h-dock: 29px;
  --wvd-panel-left: 245px;
  --wvd-panel-right: 265px;
  --wvd-text-scale: 1;

  background: var(--wvd-bg);
  color: var(--wvd-text);
  font: 400 calc(12px * var(--wvd-text-scale))/1.45 var(--wvd-font);
  color-scheme: dark;
  accent-color: var(--wvd-accent-original);
  min-width: 0;
}
.wvd-studio :is(button, input, select, textarea) { font: inherit; }
.wvd-studio button { cursor: pointer; }
.wvd-studio button:disabled { opacity: .42; cursor: not-allowed; }
.wvd-studio :is(button, input, select, textarea, a, summary):focus-visible {
  outline: 2px solid var(--wvd-accent);
  outline-offset: 2px;
}
.wvd-studio a { color: var(--wvd-accent-soft); }
.wvd-studio .wvd-muted { color: var(--wvd-text-muted); }
.wvd-studio .wvd-secondary { color: var(--wvd-text-secondary); }
.wvd-studio .wvd-mono { font-family: var(--wvd-font-code); }
.wvd-studio .wvd-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Classic 3-column workspace */
.wvd-studio .wvd-workspace {
  display: grid;
  grid-template-columns: var(--wvd-panel-left) minmax(320px, 1fr) var(--wvd-panel-right);
  grid-template-rows: var(--wvd-h-header) var(--wvd-h-tabs) minmax(0,1fr);
  height: 100vh;
  min-height: 550px;
  overflow: hidden;
  background: var(--wvd-bg);
}
.wvd-studio .wvd-header { grid-column: 1/-1; display: flex; align-items: center; gap: 12px; padding: 5px 12px; background: var(--wvd-header); border-bottom: 1px solid #383838; }
.wvd-studio .wvd-brand { display:flex; align-items:center; gap:9px; min-width:0; }
.wvd-studio .wvd-brand-icon { width:28px; height:28px; border-radius:5px; background:#70bef2; color:#18232e; font-size:17px; font-weight:800; display:grid; place-items:center; flex:none; }
.wvd-studio .wvd-brand-title { font-size:13px; font-weight:800; color:#eee; letter-spacing:0; line-height:1.1; margin:0; }
.wvd-studio .wvd-brand-sub { color:#999; font-size:10px; line-height:1.2; margin-top:2px; }
.wvd-studio .wvd-header-actions { margin-left:auto; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.wvd-studio .wvd-tabs { grid-column:1/-1; display:flex; align-items:stretch; gap:3px; padding:0 8px; background:var(--wvd-panel); border-bottom:1px solid #454545; min-width:0; }
.wvd-studio .wvd-tab { border:0; border-bottom:2px solid transparent; padding:6px 12px; min-width:125px; background:transparent; color:#aaa; font-size:11px; font-weight:600; border-radius:5px 5px 0 0; }
.wvd-studio .wvd-tab:hover { background:#383838; color:#e0e0e0; }
.wvd-studio .wvd-tab.is-active, .wvd-studio .wvd-tab[aria-selected="true"] { background:#363636; color:#f3f3f3; border-bottom-color:var(--wvd-accent); }
.wvd-studio .wvd-tab-spacer { flex:1; }
.wvd-studio .wvd-left { grid-column:1; grid-row:3; min-width:0; overflow:auto; background:var(--wvd-panel); border-right:1px solid #444; }
.wvd-studio .wvd-center { grid-column:2; grid-row:3; min-width:0; min-height:0; display:flex; flex-direction:column; background:var(--wvd-stage); overflow:hidden; }
.wvd-studio .wvd-right { grid-column:3; grid-row:3; min-width:0; overflow:auto; background:var(--wvd-panel); border-left:1px solid #444; }
.wvd-studio .wvd-dock-title { min-height:var(--wvd-h-dock); display:flex; align-items:center; gap:6px; background:var(--wvd-surface); border-bottom:1px solid #494949; color:#c8c8c8; padding:6px 11px; font-size:10px; font-weight:700; letter-spacing:.45px; text-transform:uppercase; }
.wvd-studio .wvd-section { padding:12px 11px; border-bottom:1px solid #414141; }
.wvd-studio .wvd-section-title { color:#bcbcbc; font-size:10px; font-weight:700; letter-spacing:.35px; text-transform:uppercase; margin:0 0 8px; }
.wvd-studio .wvd-toolbar { display:flex; align-items:center; gap:6px; flex-wrap:wrap; padding:7px 10px; background:#303236; border-bottom:1px solid #494c50; }
.wvd-studio .wvd-stage { flex:1; position:relative; min-height:140px; overflow:hidden; background:#242629; }
.wvd-studio .wvd-status { padding:6px 12px; border-top:1px solid #43474d; background:#292b2f; color:#b7c4cd; font-size:11px; }

/* Interactive elements */
.wvd-studio .wvd-btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:32px; padding:8px 11px; border:1px solid #545454; border-radius:var(--wvd-radius); background:#3b3b3b; color:#cfcfcf; font-size:11px; font-weight:600; line-height:1.2; white-space:normal; }
.wvd-studio .wvd-btn:hover { background:#484848; }
.wvd-studio .wvd-btn-primary { background:var(--wvd-blue-button); border-color:#68c0f0; color:white; }
.wvd-studio .wvd-btn-primary:hover { background:var(--wvd-blue-button-hover); }
.wvd-studio .wvd-btn-ghost { background:transparent; border-color:#4b4b4b; color:#b6b6b6; }
.wvd-studio .wvd-btn-ghost:hover { background:#444; color:#eee; }
.wvd-studio .wvd-btn.is-active, .wvd-studio .wvd-btn[aria-pressed="true"] { color:#b1dfff; background:var(--wvd-accent-panel); border-color:#478dbb; }
.wvd-studio .wvd-btn-row { display:flex; gap:6px; flex-wrap:wrap; }
.wvd-studio .wvd-btn-block { width:100%; }
.wvd-studio .wvd-field { display:flex; flex-direction:column; gap:5px; margin:0 0 12px; }
.wvd-studio .wvd-label { color:var(--wvd-text-secondary); font-size:11px; font-weight:600; }
.wvd-studio .wvd-input, .wvd-studio .wvd-select, .wvd-studio .wvd-textarea { width:100%; min-width:0; padding:7px 8px; color:var(--wvd-text); background:var(--wvd-input); border:1px solid #515151; border-radius:var(--wvd-radius); font-size:11px; }
.wvd-studio .wvd-select option { background:var(--wvd-input); color:var(--wvd-text); }
.wvd-studio .wvd-input:focus, .wvd-studio .wvd-select:focus, .wvd-studio .wvd-textarea:focus { border-color:#80caff; }
.wvd-studio .wvd-range { width:100%; margin:6px 0; accent-color:#83d0ff; }
.wvd-studio .wvd-check { display:inline-flex; gap:7px; align-items:center; color:#bababa; font-size:11px; }
.wvd-studio .wvd-check input { accent-color:var(--wvd-accent-original); }
.wvd-studio .wvd-chip { display:inline-flex; align-items:center; padding:5px 7px; background:#373737; border:1px solid #4c4c4c; border-radius:var(--wvd-radius); font-size:10px; color:#aaa; font-weight:500; }
.wvd-studio .wvd-chip.is-active { background:#263e4d; border-color:#4d9bc9; color:#b0e2ff; }
.wvd-studio .wvd-card { background:var(--wvd-card); border:1px solid #4a4a4a; border-radius:var(--wvd-radius); overflow:hidden; }
.wvd-studio .wvd-card.is-selected { border-color:var(--wvd-accent-original); }
.wvd-studio .wvd-card-header { padding:8px 10px; border-bottom:1px solid #494949; background:#363636; font-weight:600; }
.wvd-studio .wvd-card-body { padding:12px; }
.wvd-studio .wvd-help-text { margin-top:6px; color:#a9b7c3; font-size:12px; line-height:1.5; }
.wvd-studio .wvd-divider { height:1px; background:var(--wvd-border); margin:8px 0; }
.wvd-studio .wvd-progress { width:100%; height:5px; overflow:hidden; border-radius:99px; background:#484848; }
.wvd-studio .wvd-progress > span { display:block; height:100%; width:var(--wvd-progress,0%); background:var(--wvd-accent); }
.wvd-studio .wvd-details { border:1px solid #474747; background:#303030; border-radius:var(--wvd-radius); overflow:hidden; }
.wvd-studio .wvd-details summary { cursor:pointer; padding:9px 10px; color:#b8b8b8; font-size:11px; font-weight:600; }
.wvd-studio .wvd-details[open] summary { border-bottom:1px solid #424242; }
.wvd-studio .wvd-details-body { padding:10px; }

/* Large informational windows — intentionally readable like v8.3+ */
.wvd-studio .wvd-overlay { position:fixed; inset:0; z-index:999; display:grid; place-items:center; padding:18px; background:rgba(14,16,20,.88); }
.wvd-studio .wvd-overlay[hidden] { display:none; }
.wvd-studio .wvd-modal { width:min(640px,96vw); max-height:88vh; overflow:auto; background:#303237; border:1px solid #5d6166; border-radius:var(--wvd-radius-modal); padding:26px; box-shadow:0 18px 70px #000b; }
.wvd-studio .wvd-modal h2 { font-size:22px; line-height:1.3; color:#f5f7fb; margin:0 0 14px; }
.wvd-studio .wvd-modal h3 { font-size:17px; color:#f0f3f6; }
.wvd-studio .wvd-modal p, .wvd-studio .wvd-modal li { font-size:14px; line-height:1.7; color:#cbd3dc; }
.wvd-studio .wvd-modal .wvd-btn { font-size:14px; min-height:40px; }
.wvd-studio .wvd-banner { padding:14px 20px; background:#282828; border-top:1px solid #4c4c4c; color:#d7dfe5; font-size:14px; line-height:1.55; }
.wvd-studio .wvd-banner-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }

/* Optional comfortable mode — not in the original, use when 10–11px is too small */
.wvd-studio.wvd-comfortable { --wvd-text-scale:1.12; }
.wvd-studio.wvd-comfortable :is(.wvd-tab,.wvd-btn,.wvd-select,.wvd-input,.wvd-textarea,.wvd-label,.wvd-details summary) { font-size:13px; }
.wvd-studio.wvd-comfortable :is(.wvd-section-title,.wvd-dock-title) { font-size:12px; }

.wvd-studio :is(.wvd-left,.wvd-right,.wvd-center)::-webkit-scrollbar { width:5px; }
.wvd-studio :is(.wvd-left,.wvd-right,.wvd-center)::-webkit-scrollbar-thumb { background:#555; border-radius:10px; }

@media (max-width:1120px) {
  .wvd-studio { --wvd-panel-left:205px; --wvd-panel-right:240px; }
}
@media (max-width:820px) {
  .wvd-studio .wvd-workspace { height:auto; min-height:100vh; display:flex; flex-direction:column; overflow:visible; }
  .wvd-studio .wvd-header { min-height:50px; }
  .wvd-studio .wvd-tabs { min-height:36px; }
  .wvd-studio .wvd-tab { min-width:0; flex:1; }
  .wvd-studio .wvd-left,.wvd-studio .wvd-right { border:0; border-bottom:1px solid #444; overflow:visible; }
  .wvd-studio .wvd-center { min-height:500px; overflow:visible; }
  .wvd-studio .wvd-stage { min-height:380px; }
}
@media (max-width:540px) {
  .wvd-studio .wvd-brand-sub { font-size:9px; }
  .wvd-studio .wvd-tabs { padding:0 4px; }
  .wvd-studio .wvd-tab { font-size:10px; padding:6px 5px; }
  .wvd-studio .wvd-header { flex-wrap:wrap; }
  .wvd-studio .wvd-header-actions { width:100%; margin:0; }
  .wvd-studio .wvd-modal { padding:19px; }
  .wvd-studio .wvd-modal h2 { font-size:19px; }
}
