/* EDITOR VIEW */
.zt-view-container { padding: 24px; display: flex; flex-direction: column; height: 100%; animation: slideUpFade 0.25s ease-out; overflow-y: hidden; }

/* SPACING UPDATE FOR SIDEBAR */
.zt-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; margin-top: 16px; }
.zt-label-row:first-child { margin-top: 0; }
.zt-label { font-size: 11px; font-weight: 700; color: var(--zt-muted); text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 6px; }

.zt-input-title, .zt-input-select { width: 100%; padding: 10px 12px; font-size: 13px; font-weight: 500; border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 12px; outline: none; background: var(--zt-surface-strong); transition: border 0.2s, box-shadow 0.2s; color: var(--zt-text); }
.zt-input-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.zt-input-select:hover { background-color: #f8fafc; border-color: rgba(15, 23, 42, 0.14); }
.zt-input-title:focus { border-color: var(--zt-primary); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12); }

.zt-box-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 5px; align-items: center; justify-items: center; padding: 8px; border-radius: 12px; border: 1px dashed rgba(15, 23, 42, 0.14); background: rgba(248, 250, 252, 0.9); }
.zt-box-input { width: 100%; max-width: 58px; min-width: 0; padding: 5px; font-size: 11px; text-align: center; border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 8px; outline: none; background: #ffffff; color: #334155; }
.zt-box-input:focus { border-color: var(--zt-primary); box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.12); }
.zt-box-input.top { grid-column: 2; grid-row: 1; }
.zt-box-input.right { grid-column: 3; grid-row: 2; }
.zt-box-input.bottom { grid-column: 2; grid-row: 3; }
.zt-box-input.left { grid-column: 1; grid-row: 2; }
.zt-box-center { grid-column: 2; grid-row: 2; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #94a3b8; display: flex; align-items: center; justify-content: center; }
.zt-box-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.zt-box-title-actions { display: flex; align-items: center; gap: 6px; }
.zt-box-title-row .zt-label { margin-bottom: 0; }
.zt-box-sync { padding: 3px 8px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; border-radius: 999px; border: 1px solid rgba(15, 23, 42, 0.12); background: #ffffff; color: #64748b; cursor: pointer; line-height: 1; }
.zt-box-sync.is-on { background: rgba(14, 165, 233, 0.16); border-color: rgba(14, 165, 233, 0.4); color: #0f172a; }
.zt-box-sync:focus { outline: none; box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2); }
.zt-field-row { display: flex; align-items: center; gap: 8px; }
.zt-field-row .zt-input-title,
.zt-field-row .zt-input-select { flex: 1; }
.zt-reset-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(15, 23, 42, 0.12); background: #ffffff; color: #94a3b8; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s, border 0.2s, color 0.2s; }
.zt-reset-btn:hover { background: rgba(14, 165, 233, 0.1); color: var(--zt-primary-strong); border-color: rgba(14, 165, 233, 0.3); }
.zt-reset-btn svg { width: 14px; height: 14px; stroke-width: 2.5; }
.zt-border-center { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #94a3b8; }
.zt-border-color { width: 26px; height: 26px; padding: 0; border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 50%; background: transparent; cursor: pointer; }

.zt-btn-group { display: flex; gap: 12px; width: 100%; margin-top: auto; padding-bottom: 4px;}
.zt-btn-cancel { flex: 1; padding: 14px; background: transparent; color: #475569; border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 12px; font-weight: 600; cursor: pointer; transition: background 0.2s, border 0.2s; }
.zt-btn-cancel:hover { background: rgba(15, 23, 42, 0.04); border-color: rgba(15, 23, 42, 0.2); }
.zt-btn-save { flex: 1; padding: 14px; background: var(--zt-gradient); color: white; border: none; border-radius: 12px; font-weight: 600; cursor: pointer; box-shadow: 0 10px 24px rgba(14, 165, 233, 0.25); display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.zt-save-icon { flex: none; }

/* --- EDITOR LAYOUT --- */
#zt-fs-layer { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: var(--zt-bg); background-image: radial-gradient(220px 140px at 10% 8%, rgba(14, 165, 233, 0.12), transparent 65%), radial-gradient(240px 160px at 92% 6%, rgba(34, 197, 94, 0.12), transparent 60%); z-index: 2147483646; display: none; flex-direction: column; animation: zoomIn 0.2s; }
#zt-fs-layer.show { display: flex; }
.zt-fs-header { display: flex; align-items: center; justify-content: space-between; min-height: 60px; height: auto; padding: 8px 20px; background: var(--zt-surface-strong); border-bottom: 1px solid rgba(15, 23, 42, 0.08); overflow: visible; }
.zt-header-group { display: flex; align-items: center; gap: 12px; }
.zt-header-left { min-width: 180px; }
.zt-header-right { gap: 8px; }
.zt-header-toolbar { flex: 1; justify-content: center; min-width: 0; }
.zt-logo { display: inline-flex; align-items: center; gap: 10px; }
.zt-logo-mark { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 10px 18px rgba(15, 23, 42, 0.16); overflow: hidden; background: #dbeafe; }
.zt-logo-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.zt-logo-text { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; color: var(--zt-text); }
.zt-logo-sub { margin-left: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.1px; color: #94a3b8; }
#zt-inline-toolbar { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; justify-content: center; min-height: 32px; overflow: hidden; }
.zt-mobile-editor-controls { display: none; align-items: center; gap: 6px; flex: 0 0 auto; }
.zt-inline-tools { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; justify-content: center; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.zt-inline-tools::-webkit-scrollbar { height: 6px; }
.zt-inline-tools::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.45); border-radius: 999px; }
.zt-inline-tools .zt-toolbar-empty { font-size: 12px; color: #94a3b8; white-space: nowrap; }
.zt-inline-tools .zt-bar-row { margin: 0; }
.zt-inline-tools .zt-bar-input { min-width: 0; }
.zt-inline-tools .zt-bar-label { font-size: 9px; }
.zt-mobile-editor-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(36, 28, 26, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--zt-text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(47, 31, 27, 0.08);
}
.zt-toggle-icon { flex: none; }
.zt-cubes-icon { margin-left: -1px; }
.zt-mobile-editor-toggle[aria-pressed="true"] {
  background: var(--zt-gradient);
  color: #ffffff;
  border-color: transparent;
}
.zt-fs-grid { flex: 1; display: grid; grid-template-columns: 260px 1fr 320px; overflow: hidden; }
.zt-fs-label-bar { display: flex; align-items: center; padding: 0 20px; height: 44px; font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; background: rgba(255, 255, 255, 0.9); border-bottom: 1px solid rgba(15, 23, 42, 0.06); letter-spacing: 0.6px; width: 100%; }
.zt-fs-settings-col { background: var(--zt-surface-strong); border-left: 1px solid rgba(15, 23, 42, 0.08); display: flex; flex-direction: column; overflow: hidden; }
#zt-fs-settings-form { padding: 24px; overflow-y: auto; flex: 1; }
.zt-fs-col { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-right: 1px solid rgba(15, 23, 42, 0.08); }
.zt-fs-col-main { background: #f1f5f9; }
.zt-fs-canvas-wrapper { width: 100%; flex: 1; overflow-y: auto; display: flex; justify-content: center; padding: 32px; }
.zt-fs-modules-content { padding: 20px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1;}
.zt-fs-modules-content.zt-modules-settings { padding: 0 20px; }
.zt-style-presets-wrap {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.9);
}
.zt-style-presets-title {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.zt-style-presets {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  overflow: visible;
  scrollbar-width: none;
}
.zt-style-presets::-webkit-scrollbar { display: none; }
.zt-style-preset {
  position: relative;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: transparent;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  padding: 2px;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
  transition: border 0.2s, box-shadow 0.2s, transform 0.2s;
}
.zt-style-preset:hover { transform: translateY(-1px); }
.zt-style-preset.active {
  border-color: var(--zt-primary);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}
.zt-style-preset.is-locked {
  cursor: pointer;
  opacity: 0.75;
}
.zt-style-preset.is-locked .zt-style-thumb {
  filter: saturate(0.75);
}
.zt-style-lock {
  position: absolute;
  top: 5px;
  right: 6px;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  pointer-events: none;
}
.zt-style-thumb {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  background: var(--preset-bg);
  border: 1px solid rgba(15, 23, 42, 0.14);
  display: grid;
  grid-template-rows: 5px 1fr 6px;
  gap: 4px;
  padding: 4px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.zt-style-thumb-banner {
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--preset-accent), var(--preset-link));
  opacity: 0.9;
}
.zt-style-thumb-card {
  border-radius: 8px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--preset-glow);
  border: 1px solid var(--preset-divider);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.zt-style-thumb-line {
  height: 4px;
  border-radius: 999px;
  background: var(--preset-ink);
  opacity: 0.7;
}
.zt-style-thumb-line.short { width: 70%; opacity: 0.55; }
.zt-style-thumb-button {
  height: 5px;
  width: 55%;
  border-radius: 999px;
  background: var(--preset-accent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}
.zt-style-thumb-link {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--preset-link);
  justify-self: end;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}
.zt-style-presets-panel { margin-bottom: 12px; }
.zt-style-presets-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  grid-auto-rows: 42px;
}
.zt-style-presets-grid .zt-style-preset {
  width: 100%;
  height: 42px;
}
.zt-style-presets-grid .zt-style-thumb {
  border-radius: 10px;
}
.zt-settings-back-wrap { position: sticky; top: 0; z-index: 6; margin: 0 -20px 16px; padding: 12px 20px; background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid rgba(15, 23, 42, 0.08); box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08); }
.zt-settings-back { position: static; background: transparent; }
.zt-settings-back-wrap .zt-back-btn { margin-bottom: 0; }
.zt-settings-form-wrapper { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.zt-settings-form-body { display: flex; flex-direction: column; gap: 12px; padding-bottom: 112px; }
.zt-settings-save-wrap { position: sticky; bottom: 0; z-index: 6; margin: 16px -20px 0; padding: 12px 20px 16px; background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-top: 1px solid rgba(15, 23, 42, 0.08); box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.08); }
.zt-settings-save { position: static; width: 100%; margin-top: 0; }
.zt-settings-actions { display: flex; gap: 10px; }
.zt-settings-actions .zt-btn-cancel,
.zt-settings-actions .zt-btn-save { flex: 1; }
.zt-module-btn { background: var(--zt-surface-strong); border: 1px solid rgba(15, 23, 42, 0.08); padding: 14px; border-radius: 12px; text-align: left; cursor: grab; transition: all 0.2s; display: flex; align-items: center; gap: 12px; font-size: 13px; color: #334155; font-weight: 600; }
.zt-module-btn:hover { border-color: rgba(14, 165, 233, 0.4); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08); transform: translateY(-1px); }
.zt-module-btn { padding-right: 8px; }
.zt-module-icon { width: 20px; height: 20px; color: #64748b; }
.zt-module-group-title { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.6px; margin: 8px 4px 2px; }
.zt-component-settings { margin-left: auto; padding: 4px; border-radius: 8px; color: #94a3b8; cursor: pointer; display: flex; align-items: center; transition: all 0.2s; z-index: 5; position: relative; }
.zt-component-settings:hover { background: rgba(14, 165, 233, 0.12); color: #0f172a; }
.zt-component-settings.is-locked::after {
  content: "PRO";
  margin-left: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #f97316;
}

.zt-icon-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.zt-icon-btn svg { display: block; }

/* CANVAS */
.zt-visual-editor { background: var(--zt-surface-strong); padding: 44px; outline: none; font-family: var(--zt-font); font-size: 15px; line-height: 1.6; color: var(--zt-text); width: 100%; max-width: 820px; min-height: 320px; height: fit-content; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12); margin: 0 auto; border-radius: 18px; border: 1px solid rgba(15, 23, 42, 0.06); }
#zt-fs-layer .zt-visual-editor * { font-family: inherit; }
.zt-visual-editor:empty:before { content: 'Add blocks from the Blocks menu to start building.'; display: block; text-align: center; color: #94a3b8; padding: 40px; border: 2px dashed rgba(15, 23, 42, 0.14); border-radius: 14px; background: rgba(248, 250, 252, 0.9); }

/* BLOCKS */
.zt-builder-block { position: relative; padding: 10px; margin-bottom: 10px; transition: all 0.2s; border: 1px solid transparent; border-radius: 12px; outline: 2px solid transparent; }
.zt-builder-block:hover { outline-color: rgba(14, 165, 233, 0.3); }
.zt-builder-block.selected { outline-color: var(--zt-primary); z-index: 10; }
.zt-block-content { cursor: text; outline: none; min-height: 20px; }
.zt-block-content img { display: block; object-fit: cover; }
.zt-builder-block[data-type="social"] .zt-block-content { display: flow-root; }
.sortable-ghost { opacity: 0.5; background: rgba(14, 165, 233, 0.1); border: 2px dashed var(--zt-primary); }
.zt-column { border: 1px dashed rgba(15, 23, 42, 0.18); min-height: 100px; padding: 12px; background: transparent; transition: background 0.2s; }
.zt-column:hover { background: rgba(14, 165, 233, 0.08); border-color: var(--zt-primary); }

/* CONTROLS */
.zt-block-controls { position: absolute; top: -32px; right: 10px; background: var(--zt-gradient); border-radius: 8px 8px 0 0; display: none; gap: 2px; padding: 4px 6px; z-index: 100; box-shadow: 0 10px 22px rgba(14, 165, 233, 0.25); animation: fadeIn 0.1s; }
.zt-builder-block:hover > .zt-block-controls { display: flex; }
.zt-builder-block.selected > .zt-block-controls { display: flex; }
.zt-builder-block.zt-child-selected > .zt-block-controls { display: flex; }
.zt-control-btn { background: transparent; border: none; color: white; cursor: pointer; padding: 4px; border-radius: 4px; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
.zt-control-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; display: block; }
.zt-control-btn:hover { background: rgba(255,255,255,0.22); }
.zt-block-controls .zt-link-btn { color: #ffffff; }
.zt-block-controls .zt-link-btn svg { width: 14px; height: 14px; }
.zt-control-btn.zt-social-edit-btn { width: auto; min-width: 0; padding: 4px 8px; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; background: rgba(255, 255, 255, 0.18); }
.zt-control-btn.zt-social-edit-btn svg { width: 14px; height: 14px; }
.zt-control-btn.zt-social-edit-btn span { line-height: 1; }
.zt-control-btn.zt-social-edit-btn:hover { background: rgba(255, 255, 255, 0.3); }
.zt-drag-handle { cursor: grab; }

/* CONTEXT BAR */
.zt-context-bar { position: absolute; top: -96px; left: 0; background: var(--zt-surface-strong); border-radius: 10px; padding: 8px; box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18); border: 1px solid rgba(15, 23, 42, 0.08); z-index: 400; animation: slideUpFade 0.15s ease-out; display: flex; flex-direction: column; gap: 4px; min-width: 160px; max-width: 100%; box-sizing: border-box; overflow-x: auto; overflow-y: hidden; }
.zt-context-bar::after { content: ''; position: absolute; bottom: -6px; left: 20px; width: 10px; height: 10px; background: var(--zt-surface-strong); transform: rotate(45deg); border-bottom: 1px solid rgba(15, 23, 42, 0.08); border-right: 1px solid rgba(15, 23, 42, 0.08); }
.zt-context-bar.below { top: calc(100% + 12px); }
.zt-context-bar.below::after { top: -6px; bottom: auto; transform: rotate(225deg); }
.zt-context-bar.zt-img-bar { width: 320px; }
.zt-bar-row { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.zt-bar-sep { width: 1px; height: 18px; background: rgba(15, 23, 42, 0.1); margin: 0 4px; }
.zt-bar-btn { background: var(--zt-surface-strong); border: 1px solid transparent; border-radius: 8px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #475569; transition: all 0.1s; }
.zt-bar-btn:hover { background: rgba(14, 165, 233, 0.1); color: var(--zt-primary-strong); border-color: rgba(14, 165, 233, 0.2); }
.zt-bar-btn svg { width: 14px; height: 14px; stroke-width: 2.5; }
.zt-bar-btn b { font-weight: 800; font-size: 13px; }
.zt-bar-btn i { font-style: italic; font-family: serif; font-size: 13px; }
.zt-bar-btn u { text-decoration: underline; font-size: 13px; }
.zt-bar-btn-text { width: auto; height: 28px; padding: 0 10px; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.zt-bar-btn-text svg { width: 12px; height: 12px; }
.zt-bar-input { border: 1px solid rgba(15, 23, 42, 0.12); background: #f8fafc; border-radius: 8px; padding: 6px 8px; font-size: 12px; outline: none; flex: 0 0 auto; color: #334155; height: 28px; }
.zt-bar-input:focus { border-color: var(--zt-primary); background: white; }
.zt-bar-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--zt-surface-strong);
  border-radius: 12px;
  padding: 0 30px 0 10px;
  font-size: 12px;
  font-weight: 600;
  outline: none;
  color: #475569;
  height: 28px;
  min-width: 120px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.zt-bar-select:hover { background-color: #f8fafc; border-color: rgba(15, 23, 42, 0.14); }
.zt-bar-select:focus { border-color: var(--zt-primary); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12); background: white; }
.zt-bar-label { font-size: 9px; font-weight: 700; color: #94a3b8; text-transform: uppercase; white-space: nowrap; }
.zt-bar-note { font-size: 10px; color: #94a3b8; line-height: 1.3; max-width: 200px; }
.zt-color-circle-wrap { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(15, 23, 42, 0.14); overflow: hidden; position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.zt-color-circle { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; opacity: 0; cursor: pointer; }
.zt-link-hint { font-size: 11px; color: #94a3b8; margin-top: 6px; line-height: 1.4; }
.zt-fs-modules-content .zt-color-circle-wrap { width: 34px; height: 34px; border: 1px solid rgba(15, 23, 42, 0.12); }
.zt-fs-modules-content .zt-color-circle { top: -5px; left: -5px; width: 44px; height: 44px; padding: 0; margin: 0; }

.zt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
    z-index: 2147483650;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}
.zt-modal-overlay, .zt-modal-overlay * { box-sizing: border-box; }
.zt-modal {
    background: white;
    width: 400px;
    max-width: 90%;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 24px 45px rgba(15, 23, 42, 0.18);
    animation: zoomIn 0.2s;
    font-family: var(--zt-font);
}
.zt-vars-modal {
    width: 720px;
    max-width: 94vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.zt-vars-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: -6px;
    margin-bottom: 16px;
}
.zt-vars-modal .zt-vars-scroll {
    margin-bottom: 16px;
    padding-right: 10px;
}
.zt-modal-content { margin-bottom: 16px; }
.zt-modal-content .zt-input-title { width: 100%; max-width: 100%; }
.zt-modal-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; color: #0f172a; }

/* NEW: Category Suggestions Dropdown Items */
.zt-suggestion-item {
    padding: 8px 12px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06); /* Subtle separator */
}
.zt-suggestion-item:last-child {
    border-bottom: none;
}
.zt-suggestion-item:hover {
    background-color: rgba(14, 165, 233, 0.12);
    color: var(--zt-primary-strong);
}
.zt-cat-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.zt-cat-toggle svg {
    width: 12px;
    height: 12px;
}

/* GLOBAL SETTINGS */
.zt-group-title { font-weight: 800; font-size: 12px; text-transform: uppercase; color: #94a3b8; margin: 32px 0 12px 0; padding-bottom: 4px; border-bottom: 1px solid rgba(15, 23, 42, 0.08); letter-spacing: 0.6px; }
.zt-group-title:first-child { margin-top: 0; }
.zt-style-group { margin-bottom: 24px; background: #f8fafc; padding: 16px; border-radius: 14px; border: 1px solid rgba(15, 23, 42, 0.06); }
.zt-style-row { display: flex; gap: 10px; }
.zt-style-col { flex: 1; }
.zt-style-col label { display: block; font-size: 11px; margin-bottom: 6px; color: #64748b; font-weight: 600; }
.zt-color-input-row { display: flex; align-items: center; gap: 12px; background: white; padding: 8px; border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 12px; }
.zt-color-input-row input[type="color"] { border: none; width: 28px; height: 28px; padding: 0; border-radius: 6px; }
.zt-hex-label { font-family: var(--zt-font-mono); color: #64748b; font-size: 13px; font-weight: 500; }

/* HTML COMPONENT STYLES */
.zt-html-container {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    overflow: hidden;
    background: white;
    display: flex;
    flex-direction: column;
}

.zt-html-header {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.zt-html-tab {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    outline: none;
    transition: all 0.2s;
}
.zt-html-tab:hover { background: rgba(14, 165, 233, 0.08); color: #0f172a; }
.zt-html-tab.active { background: white; color: var(--zt-primary); box-shadow: inset 0 -2px 0 var(--zt-primary); }

.zt-html-content-view { padding: 10px; min-height: 50px; }
.zt-html-source-view { display: block; padding: 0; }
.zt-html-preview-view { padding: 12px; min-height: 150px; background: white; overflow: auto; }

/* DRACULA THEME (Simple Textarea) */
.zt-html-code-editor {
    width: 100%;
    min-height: 150px;
    border: none;
    padding: 12px;
    font-family: var(--zt-font-mono);
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    background-color: #0f172a;
    color: #e2e8f0;
    display: block;
}

/* TOGGLE LOGIC */
.zt-html-container.source-mode .zt-html-content-view { display: none; }
.zt-html-container.source-mode .zt-html-source-view { display: block; }

/* --- NEW: ROBUST BACK BUTTON STYLE --- */
.zt-back-btn {
    width: 100%;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}
.zt-back-btn:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.22);
    color: #0f172a;
}
