/* Logo Maker — 3D block-text Minecraft title logo generator.
 * Scoped with #tool-root #lgm and #lgm to ensure specificity over generic tool-theme.css rules.
 */

#tool-root #lgm,
#lgm {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

#tool-root #lgm * {
  box-sizing: border-box;
}

#tool-root #lgm .lgm-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Card container */
#tool-root #lgm .lgm-card {
  background: var(--surface, #1e2522);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#tool-root #lgm .lgm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  padding-bottom: 10px;
  margin-bottom: 2px;
}

#tool-root #lgm .lgm-card-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg, #e2e8f0);
  opacity: 0.85;
}

#tool-root #lgm .lgm-dims {
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--fg, #e2e8f0);
  opacity: 0.65;
}

/* Preview Stage */
#tool-root #lgm .lgm-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 10px;
  background: var(--bg, #111815);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  overflow: hidden;
  min-height: 160px;
}

#tool-root #lgm .lgm-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 6px;
  padding: 8px;
}

#tool-root #lgm .lgm-canvas-wrap[data-transparent="true"] {
  background-color: #4a4a4a;
  background-image:
    linear-gradient(45deg, rgba(0, 0, 0, 0.28) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.28) 75%),
    linear-gradient(45deg, rgba(0, 0, 0, 0.28) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.28) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}

#tool-root #lgm #lgm-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Action Buttons */
#tool-root #lgm .lgm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#tool-root #lgm .lgm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.15));
  background: var(--surface-2, #29342e);
  color: var(--fg, #e2e8f0);
  transition: background 0.15s ease, border-color 0.15s ease;
}

#tool-root #lgm .lgm-btn:hover {
  background: var(--line, rgba(255, 255, 255, 0.15));
}

#tool-root #lgm .lgm-btn-primary {
  background: var(--brand, #10b981);
  color: #ffffff;
  border-color: transparent;
}

#tool-root #lgm .lgm-btn-primary:hover {
  filter: brightness(1.1);
}

#tool-root #lgm .lgm-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand, #10b981);
  margin: 0;
  min-height: 18px;
}

/* Controls Grid */
#tool-root #lgm .lgm-controls-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

/* Fields & Layout */
#tool-root #lgm .lgm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#tool-root #lgm .lgm-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg, #e2e8f0);
  opacity: 0.8;
}

#tool-root #lgm .lgm-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand, #10b981);
  text-transform: none;
}

#tool-root #lgm .lgm-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

#tool-root #lgm .lgm-inline-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

#tool-root #lgm .lgm-flex-1 {
  flex: 1 1 0;
  min-width: 0;
}

/* Form Controls */
#tool-root #lgm .lgm-input-text {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.15));
  background: var(--bg, #111815);
  color: var(--fg, #ffffff);
}

#tool-root #lgm .lgm-select {
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.15));
  background: var(--bg, #111815);
  color: var(--fg, #ffffff);
  cursor: pointer;
}

#tool-root #lgm .lgm-range {
  width: 100%;
  margin: 4px 0;
  accent-color: var(--brand, #10b981);
}

#tool-root #lgm .lgm-checkbox {
  accent-color: var(--brand, #10b981);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

#tool-root #lgm .lgm-check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg, #e2e8f0);
  cursor: pointer;
}

/* Tabs */
#tool-root #lgm .lgm-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg, #111815);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

#tool-root #lgm .lgm-tab {
  flex: 1 1 0;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--fg, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
}

#tool-root #lgm .lgm-tab-active {
  background: var(--surface-2, #29342e);
  color: var(--fg, #ffffff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Panels */
#tool-root #lgm .lgm-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

#tool-root #lgm .lgm-color-picker-wrap {
  display: flex;
  gap: 6px;
  align-items: center;
}

#tool-root #lgm .lgm-color-input {
  width: 34px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.2));
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}

#tool-root #lgm .lgm-input-hex {
  width: 86px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
  border-radius: 6px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.15));
  background: var(--bg, #111815);
  color: var(--fg, #ffffff);
}

/* Gradient Presets */
#tool-root #lgm .lgm-grad-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

#tool-root #lgm .lgm-chip {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.15));
  background: var(--surface-2, #29342e);
  color: var(--fg, #e2e8f0);
  cursor: pointer;
}

#tool-root #lgm .lgm-chip:hover {
  background: var(--line, rgba(255, 255, 255, 0.2));
}

/* Help Section */
#tool-root #lgm .lgm-help {
  margin-top: 10px;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--surface, #1e2522);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  color: var(--fg, #cbd5e1);
  font-size: 13px;
  line-height: 1.6;
}

#tool-root #lgm .lgm-help p {
  margin: 0;
}

@media (max-width: 768px) {
  #tool-root #lgm .lgm-controls-col {
    grid-template-columns: 1fr;
  }

  #tool-root #lgm .lgm-row {
    flex-direction: column;
    gap: 8px;
  }
}
