/* Logo Refinement page styles */

/* ── Layout ─────────────────────────────────────────────────────────────── */
.refine-body {
  background: #f7f8fa;
}

.refine-main {
  flex: 1;
  padding: 24px 16px 60px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.refine-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .refine-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Panel shared ───────────────────────────────────────────────────────── */
.refine-preview-panel,
.refine-controls-panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 24px;
}

.refine-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.refine-panel-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.refine-concept-badge {
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
  background: #eff2ff;
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── Live preview canvas ────────────────────────────────────────────────── */
.refine-canvas {
  border-radius: 12px;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  gap: 16px;
  transition: background 0.2s;
  border: 1px solid rgba(0,0,0,0.06);
}

.refine-canvas-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.refine-canvas-logo svg {
  width: 120px;
  height: auto;
  max-height: 120px;
}

.refine-canvas-name {
  font-size: 28px;
  letter-spacing: -0.5px;
  text-align: center;
  transition: font-family 0.2s, font-weight 0.2s;
}

.refine-canvas-tagline {
  font-size: 15px;
  text-align: center;
  opacity: 0.7;
}

/* ── Refinement counter ─────────────────────────────────────────────────── */
.refine-counter {
  margin-top: 16px;
  text-align: center;
}

.refine-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  padding: 5px 12px;
  border-radius: 20px;
}

.refine-count-badge.pro {
  color: #7c3aed;
  background: #f5f3ff;
}

.refine-count-badge.limit {
  color: #dc2626;
  background: #fef2f2;
}

.refine-count-badge a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
}

/* ── Save row ────────────────────────────────────────────────────────────── */
.refine-save-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.refine-save-btn {
  flex: 1;
  justify-content: center;
}

.refine-save-status {
  font-size: 13px;
  font-weight: 500;
}

.refine-save-status.ok    { color: #16a34a; }
.refine-save-status.error { color: #dc2626; }

/* ── History strip ───────────────────────────────────────────────────────── */
.refine-history {
  margin-top: 24px;
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
}

.refine-history-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.refine-history-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.refine-history-thumb {
  flex-shrink: 0;
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.15s, background 0.15s;
  min-width: 68px;
}

.refine-history-thumb:hover {
  border-color: #6366f1;
  background: #f5f3ff;
}

.history-thumb-svg svg {
  width: 40px;
  height: 40px;
}

.refine-history-thumb span {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}

/* ── Controls panel ─────────────────────────────────────────────────────── */
.refine-section {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.refine-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.refine-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.refine-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  display: block;
  margin-bottom: 6px;
}

/* ── Palette presets ─────────────────────────────────────────────────────── */
.refine-color-presets {
  margin-bottom: 16px;
}

.refine-swatch-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.refine-swatch-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.refine-swatch-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ── Color input rows ─────────────────────────────────────────────────────── */
.refine-color-row {
  margin-bottom: 12px;
}

.refine-color-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.refine-color-picker {
  width: 44px;
  height: 36px;
  padding: 2px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  background: none;
}

.refine-hex-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-family: monospace;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
}

.refine-hex-input:focus {
  outline: none;
  border-color: #6366f1;
  background: #fff;
}

/* ── Font controls ──────────────────────────────────────────────────────── */
.refine-font-row {
  margin-bottom: 12px;
}

.refine-select {
  width: 100%;
  margin-top: 6px;
  padding: 9px 12px;
  font-size: 13px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
}

.refine-select:focus {
  outline: none;
  border-color: #6366f1;
}

.refine-font-preview {
  margin-top: 10px;
  font-size: 22px;
  color: #0f172a;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  text-align: center;
  transition: font-family 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Variation buttons ──────────────────────────────────────────────────── */
.refine-hint {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 12px;
}

.refine-variation-row {
  display: flex;
  gap: 8px;
}

.refine-variation-btn {
  flex: 1;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  background: #f1f5f9;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.refine-variation-btn:hover {
  background: #eff2ff;
  border-color: #6366f1;
  color: #4338ca;
}

/* ── Apply button ────────────────────────────────────────────────────────── */
.refine-apply-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
}

.refine-apply-btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.refine-apply-btn:hover { opacity: 0.92; }
.refine-apply-btn:active { transform: scale(0.98); }
.refine-apply-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.refine-apply-status {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.refine-apply-status.ok    { color: #16a34a; }
.refine-apply-status.error { color: #dc2626; }

/* ── Shared button overrides for save btn ─────────────────────────────── */
.refine-save-btn {
  padding: 12px 20px;
  font-size: 14px;
  border-radius: 10px;
}

.refine-save-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
