/* setup.css — first-run wizard overlay styles */

/* ============================================================
   SETUP OVERLAY — full-screen blocking layer
   ============================================================ */
.setup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.65);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.setup-overlay.open {
  display: flex;
}

/* ============================================================
   WIZARD CARD
   ============================================================ */
.setup-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 520px;
  padding: 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.setup-card h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-dark);
  font-family: var(--font-serif);
}

.setup-card p {
  margin: 0;
  font-size: 0.92rem;
  color: #444;
  line-height: 1.55;
}

.setup-card .setup-icon {
  font-size: 2.2rem;
  line-height: 1;
}

/* ── Step panels ─────────────────────────────────────────── */
.setup-step { display: none; }
.setup-step.active { display: contents; }

/* ── Error block ─────────────────────────────────────────── */
.setup-error-box {
  background: #fff3f3;
  border: 1.5px solid #f5c6cb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #721c24;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Info / notice block ─────────────────────────────────── */
.setup-info-box {
  background: #f0f7ff;
  border: 1.5px solid #bde0fe;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #0c4a7c;
  line-height: 1.5;
}

/* ── Warning block ───────────────────────────────────────── */
.setup-warn-box {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #78350f;
  line-height: 1.5;
}

/* ── Error list ──────────────────────────────────────────── */
.setup-error-list {
  max-height: 160px;
  overflow-y: auto;
  background: #1e1e1e;
  color: #f8d7da;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  font-family: monospace;
  line-height: 1.6;
  list-style: none;
  margin: 0;
}
.setup-error-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.3rem;
  margin-top: 0.3rem;
}

/* ── Action buttons row ──────────────────────────────────── */
.setup-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.setup-actions button {
  flex: 1 1 auto;
  min-width: 7rem;
}

/* ── Progress spinner ────────────────────────────────────── */
.setup-spinner {
  display: none;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: #555;
}
.setup-spinner.visible { display: flex; }
.setup-spinner-ring {
  width: 18px;
  height: 18px;
  border: 3px solid #ccc;
  border-top-color: var(--green-dark);
  border-radius: 50%;
  animation: setup-spin 0.75s linear infinite;
  flex-shrink: 0;
}
@keyframes setup-spin {
  to { transform: rotate(360deg); }
}

/* ── Password input ─────────────────────────────────────── */
.setup-pw-input {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.setup-pw-input:focus {
  outline: none;
  border-color: var(--green-dark);
}

/* ── Auth error message ──────────────────────────────────── */
.setup-auth-error {
  font-size: 0.85rem;
  color: #b91c1c;
  min-height: 1.2em;
  line-height: 1.4;
}

/* ── Upload row ──────────────────────────────────────────── */
.setup-upload-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.setup-upload-row input[type="file"] {
  flex: 1 1 auto;
  font-size: 0.85rem;
  color: #444;
}

/* ── Success tick ────────────────────────────────────────── */
.setup-success-icon {
  font-size: 3rem;
  text-align: center;
  line-height: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 560px) {
  .setup-card {
    padding: 1.5rem 1.25rem 1.25rem;
    border-radius: 10px;
  }
  .setup-actions {
    flex-direction: column;
  }
  .setup-actions button {
    width: 100%;
  }
}
