/* HTML Studio — page builder UI. Reuses the Studio tokens (--st-*). */

.hs-builder { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.hs-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Preview-first builder: the live preview is the dominant area; editing tools
   live in a compact, collapsible tabbed panel on the left. */
.hs-builder-cols { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 14px; flex: 1; min-height: 0; }
.hs-builder-cols.collapsed { grid-template-columns: 36px minmax(0, 1fr); }

/* Tabbed editor panel */
.hs-editor-panel { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--st-line); border-radius: 10px; background: var(--st-panel); overflow: hidden; }
.hs-editor-panel.collapsed { align-items: center; justify-content: flex-start; padding-top: 8px; }
.hs-editor-expand { width: 26px; height: 32px; border: 1px solid var(--st-line); border-radius: 7px; background: var(--st-panel); cursor: pointer; color: var(--st-ink-soft); }
.hs-editor-expand:hover { border-color: var(--st-accent); color: var(--st-accent); }
.hs-etabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--st-line); background: var(--st-line-soft); }
.hs-etab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 6px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--st-ink-soft); cursor: pointer; }
.hs-etab:hover { background: color-mix(in srgb, var(--st-accent) 8%, transparent); color: var(--st-ink); }
.hs-etab.active { background: var(--st-panel); color: var(--st-accent); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.hs-etab-ico { font-size: 12px; }
.hs-etab-body { flex: 1; overflow-y: auto; padding: 12px; min-height: 0; }

/* Live preview pane */
.hs-preview-pane { display: flex; flex-direction: column; border: 1px solid var(--st-line); border-radius: 10px; overflow: hidden; background: #fff; min-height: 420px; }
.hs-preview-head { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--st-line); background: var(--st-line-soft); }
.hs-preview-label { font-size: 12px; font-weight: 600; color: var(--st-ink-soft); }
.hs-preview-body { flex: 1; min-height: 0; }
.hs-preview-frame { width: 100%; height: 100%; min-height: 480px; border: 0; display: block; background: #fff; }
.hs-preview-body .hs-preview-frame { min-height: 0; }
.hs-preview-full { height: 100%; }
.hs-preview-full .hs-preview-frame { min-height: 600px; }

.hs-seclist { display: flex; flex-direction: column; gap: 10px; }
.hs-sec { border: 1px solid var(--st-line); border-radius: 11px; padding: 10px 12px; background: var(--st-panel); cursor: pointer; }
.hs-sec.sel { border-color: var(--st-accent); box-shadow: 0 0 0 1px var(--st-accent) inset; }
.hs-sec-head { display: flex; align-items: center; gap: 6px; }
.hs-sec-grip { color: var(--st-ink-soft); cursor: grab; font-size: 12px; }
.hs-sec-title { flex: 1; }
.hs-sec-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.hs-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--st-ink-soft); }
.hs-inline select { font-size: 12px; }
.hs-sec-link { font-size: 12px; color: var(--st-accent); background: color-mix(in srgb, var(--st-accent) 8%, transparent); border-radius: 6px; padding: 5px 9px; display: inline-block; }
.hs-sec-hint { font-size: 12px; color: var(--st-ink-soft); font-style: italic; }

.hs-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.hs-tpl { border: 1px solid var(--st-line); border-radius: 9px; padding: 16px 12px; cursor: pointer; background: var(--st-panel); }
.hs-tpl:hover { border-color: var(--st-accent); background: var(--st-line-soft); }
.hs-tpl-name { font-size: 12.5px; font-weight: 600; text-transform: capitalize; }
