/* =========================================================
   Corporate Logo Design Studio — Shared Stylesheet
   Works with both KTG (red/white/blue) and Double C themes
   via CSS custom property inheritance from parent stylesheet.
   ========================================================= */

/* ── Studio layout ── */
.studio-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.studio-hero {
  text-align: center;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border, #222);
  margin-bottom: 32px;
}
.studio-hero h1 { font-size: 2rem; margin-bottom: 6px; }
.studio-hero p  { color: var(--text-dim, #aaa); font-size: 1rem; max-width: 620px; margin: 0 auto; }

/* ── Two-column form + preview ── */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: start;
}

/* ── Form card ── */
.studio-form-card {
  background: var(--bg-panel, #0d0d0d);
  border: 1px solid var(--border, #222);
  border-radius: 6px;
  padding: 24px;
}
.studio-form-card h2 {
  font-size: 1.1rem;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border, #222);
  color: #fff;
}

.sf-row { margin-bottom: 14px; }
.sf-row label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-dim, #aaa);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sf-row .req { color: var(--brand-red, #cc1f1f); }

.sf-row input[type="text"],
.sf-row select,
.sf-row textarea {
  width: 100%;
  padding: 9px 12px;
  background: #060606;
  border: 1px solid var(--border, #222);
  border-radius: 4px;
  color: var(--text, #f0f0f0);
  font-family: inherit;
  font-size: .92rem;
  transition: border-color .15s;
}
.sf-row input:focus,
.sf-row select:focus,
.sf-row textarea:focus {
  outline: none;
  border-color: var(--brand-blue-light, #2e6dd4);
}
.sf-row textarea { resize: vertical; min-height: 70px; }

.sf-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }







/* API key row */
  width: 100%;
  padding: 8px 10px;
  background: #040404;
  border: 1px solid #1a2a3a;
  border-radius: 4px;
  color: #8af;
  font-family: monospace;
  font-size: .85rem;
}


/* Generate button */
.btn-generate-logo {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--brand-red, #cc1f1f), var(--brand-blue-mid, #1e4d9b));
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  transition: opacity .15s;
  margin-top: 8px;
}
.btn-generate-logo:hover  { opacity: .9; }
.btn-generate-logo:disabled { opacity: .45; cursor: not-allowed; }

/* ── Preview card ── */
.studio-preview-card {
  background: var(--bg-panel, #0d0d0d);
  border: 1px solid var(--border, #222);
  border-radius: 6px;
  padding: 24px;
  position: sticky;
  top: 20px;
}
.studio-preview-card h2 {
  font-size: 1.1rem;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border, #222);
  color: #fff;
}

.logo-canvas {
  width: 100%;
  aspect-ratio: 1;
  background: #fff;         /* white bg so logos look natural */
  border-radius: 4px;
  border: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
}
.logo-canvas img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.logo-canvas .canvas-placeholder {
  text-align: center;
  color: #888;
  padding: 30px;
  font-size: .9rem;
}
.logo-canvas .canvas-placeholder .icon { font-size: 3rem; margin-bottom: 10px; }

.logo-spinner {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  color: #fff;
  font-size: .9rem;
  display: none;
}
.logo-spinner.is-active { display: flex; }
.spinner-ring {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Status bar */
.studio-status {
  padding: 10px 14px;
  border-radius: 4px;
  font-size: .85rem;
  margin-bottom: 12px;
  display: none;
}
.studio-status.success { background:#071d10;border:1px solid #1a6b35;color:#a0e8c0;display:block; }
.studio-status.error   { background:#1a0505;border:1px solid #6b1a1a;color:#f0a0a0;display:block; }
.studio-status.info    { background:#070e1a;border:1px solid #1a3a6b;color:#90c0f0;display:block; }

/* Download + copy buttons */
.preview-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-dl, .btn-copy-prompt {
  flex: 1;
  padding: 9px 12px;
  border-radius: 4px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  border: none;
}
.btn-dl {
  background: var(--brand-blue-mid, #1e4d9b);
  color: #fff;
}
.btn-dl:disabled { opacity: .4; cursor: not-allowed; }
.btn-dl-png { background: var(--brand-green, #1a7a3c); }
.btn-copy-prompt {
  background: #1a1a1a;
  border: 1px solid #333;
  color: var(--text-dim, #aaa);
}
.btn-copy-prompt:hover { color: #fff; border-color: #555; }

/* Prompt preview box */
.prompt-preview {
  margin-top: 14px;
  background: #040608;
  border: 1px solid #1a2030;
  border-radius: 4px;
  padding: 10px 12px;
  font-family: monospace;
  font-size: .76rem;
  color: #8af;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Variations strip */
.variation-strip {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.var-thumb {
  width: 72px; height: 72px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  object-fit: contain;
  background: #fff;
}
.var-thumb:hover, .var-thumb.selected { border-color: var(--brand-blue-light, #2e6dd4); }

/* ── Responsive ── */
@media (max-width: 820px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-preview-card { position: static; }
  .sf-row-2 { grid-template-columns: 1fr; }
}
