/* ====== TOKENS ====== */
:root{
  --bg: #0B0B0B;          /* page */
  --card: #101010;        /* card */
  --panel: #0E0E0E;       /* inner panels */
  --line: #242424;        /* borders */
  --ink: #EDEDED;         /* text */
  --muted: #9B9B9B;
  --yellow: #FFD43B;      /* brand yellow */
  --radius: 18px;
  --radius-pill: 999px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
}

/* ====== SHELL / CARD ====== */
.smgp-shell{ background: var(--bg); padding: 6px; }
.smgp-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
  color: var(--ink);
}

/* ====== GRID: LEFT ↔ RIGHT ====== */
.smgp-grid{
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
  gap: 20px;
  align-items: start;
}
.smgp-left{min-width: 380px;}
.smgp-right{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  position: sticky; top: 16px;
}

/* ====== TYPOGRAPHY ====== */
.smgp-title,
.smgp-subtitle{ font-family: 'Phudu', sans-serif; text-transform: uppercase; letter-spacing:.4px; }
.smgp-title{ color: var(--yellow); margin:4px 0 12px 2px; font-size: 18px; font-weight: 800; }
.smgp-subtitle{ color: var(--yellow); margin:2px 0 10px 2px; font-size: 14px; font-weight: 800; }

.smgp-card, .smgp-label, .smgp-input, .smgp-btn, .smgp-output, .smgp-note { font-family: 'Rubik', sans-serif; }
.smgp-note{ font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ====== ROWS / COLS ====== */
.smgp-row{ display:flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.smgp-row--top{ margin-bottom: 8px; }
.smgp-col{ flex: 1 1 260px; min-width: 260px; }
.smgp-actions-inline{ display:flex; justify-content:flex-start; gap: 10px; }

/* ====== LABELS / INPUTS ====== */
.smgp-label{
  display:block; margin: 2px 0 6px 6px; font-size: 12px; font-weight: 600; color: var(--ink);
}

.smgp-input{
  width: 100%;
  padding: 10px 12px;
  background: #161616;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;                 /* pill-y but tighter */
  font-size: 13px;
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}
.smgp-input::placeholder{ color: var(--muted); }
.smgp-input:focus{ border-color:#3a3a3a; box-shadow: 0 0 0 4px rgba(255,212,59,.08); }

.smgp-select{
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #7d7d7d 50%),
    linear-gradient(135deg, #7d7d7d 50%, transparent 50%);
  background-position: calc(100% - 20px) 18px, calc(100% - 14px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* ====== DYNAMIC FIELDS GRID ====== */
.smgp-form{
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;      /* side-by-side inputs */
  gap: 10px;
}
.smgp-field{
  position: relative;
  display: flex; flex-direction: column;
  background: #121212;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}
.smgp-field label{ font-size: 12px; margin: 0 0 6px 4px; }
.smgp-textarea{ min-height: 90px; resize: vertical; }
.smgp-array{ min-height: 70px; resize: vertical; }

/* tooltip dot */
.smgp-tip{
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px; border-radius: var(--radius-pill);
  background: var(--yellow); color: #111; font-weight: 800; font-size: 12px;
  display:flex; align-items:center; justify-content:center; cursor: help;
  box-shadow: 0 6px 14px rgba(255,212,59,.28);
}

/* ====== BUTTONS ====== */
.smgp-btn{
  border: 0; cursor: pointer; font-weight: 800; text-transform: uppercase; letter-spacing:.3px;
  border-radius: var(--radius-pill);
  padding: 10px 18px; font-size: 13px;
}
.smgp-btn--primary{ background: var(--yellow); color: #141414; }
.smgp-btn--primary:hover{ filter: brightness(1.03); }
.smgp-btn--secondary{ background:#202020; color:#fff; border:1px solid var(--line); }
.smgp-btn--secondary:hover{ border-color:#3a3a3a; }

.smgp-actions{ display:flex; gap: 10px; margin-top: 10px; }

/* ====== PREVIEW ====== */
.smgp-output{
  width: 100%;
  background: #0C0C0C;
  color: #C3F3C3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  white-space: pre; overflow: auto;
  font-size: 12.5px;
  font-family: 'Rubik', ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  min-height: 480px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1080px){
  .smgp-grid{ grid-template-columns: 1fr; }
  .smgp-right{ position: static; }
}
@media (max-width: 840px){
  .smgp-form{ grid-template-columns: 1fr; }
}

/* Force crisp, visible text on dark inputs */
.smgp-input,
.smgp-textarea,
.smgp-array {
  color: #ffffff !important;
  background: #161616 !important;
  caret-color: #FFD43B;
}
.smgp-input::placeholder { color: rgba(255,255,255,0.55); }

