@import url("../source-panel.css");

:root {
  --page: #f2f5f3;
  --surface: #ffffff;
  --ink: #17251d;
  --muted: #495b50;
  --line: #c5d2c8;
  --brand: #174f2d;
  --brand-dark: #0e351d;
  --accent: #d97706;
  --success: #15803d;
  --danger: #b91c1c;
  --soft: #e5ede7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 24px;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.page { width: min(56rem, 94%); margin: 0 auto; }

.page-header {
  margin: 0 0 20px;
  padding: 22px;
  background: var(--brand);
  color: #fff;
  border-radius: 14px;
  text-align: center;
}

.page-header h1, .page-header p { margin: 0 0 8px; }
.page-header p { color: #dceade; }

.card {
  margin: 0 0 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.card h2 { margin: 0 0 10px; color: var(--brand); }

.field { margin: 14px 0; }
.field label, .field legend { display: block; margin: 0 0 6px; font-weight: 700; }

input, select, textarea, button {
  font: inherit;
}

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #789383;
  border-radius: 0.5rem;
  background: #fff;
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 79, 45, 0.2);
}

.field.is-ok input, .field.is-ok select { border-color: var(--success); }
.field.is-bad input, .field.is-bad select { border-color: var(--danger); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

button {
  min-height: 2.6rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--brand-dark);
  border-radius: 0.5rem;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: #fff;
  color: var(--brand);
  border-color: #789383;
}

.message { margin: 0.75rem 0 0; color: var(--muted); }
.message.ok { color: var(--success); font-weight: 700; }
.message.bad { color: var(--danger); font-weight: 700; }

.input-group {
  display: flex;
  width: 100%;
}
.input-group input { border-radius: 0.5rem 0 0 0.5rem; }
.input-group .addon {
  display: flex; align-items: center;
  padding: 0 0.85rem;
  background: var(--soft);
  border: 1px solid #789383;
  border-left: 0;
  border-radius: 0 0.5rem 0.5rem 0;
  font-weight: 700;
  white-space: nowrap;
}

.switch-row { display: flex; align-items: center; gap: 0.75rem; margin: 0.75rem 0; }
.switch-row input { width: auto; }

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0.35rem;
  min-height: 9rem;
  padding: 1.25rem;
  border: 2px dashed #a9bdaf;
  border-radius: 0.9rem;
  background: var(--soft);
  text-align: center;
}
.dropzone.is-active { border-color: var(--brand); background: #dce8df; }
.dropzone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

.file-list, .step-list { margin: 0.75rem 0 0; padding-left: 1.2rem; }

.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.15rem;
}
.star-rating input {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); overflow: hidden;
}
.star-rating label {
  margin: 0; font-size: 1.75rem; color: #cbd5d1; cursor: pointer;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label { color: var(--accent); }

.wizard-steps {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  list-style: none; margin: 0 0 1rem; padding: 0;
}
.wizard-steps li {
  padding: 0.35rem 0.7rem; border-radius: 999px;
  background: var(--soft); color: var(--muted); font-weight: 700; font-size: 0.85rem;
}
.wizard-steps .is-current { background: var(--brand); color: #fff; }
.wizard-steps .is-done { background: #dcfce7; color: var(--success); }

.wizard-progress {
  height: 0.4rem; margin: 0 0 1rem; background: #dce8df; border-radius: 999px; overflow: hidden;
}
.wizard-progress > span { display: block; height: 100%; background: var(--brand); width: 33%; }

.step-panel[hidden] { display: none !important; }

output {
  display: block;
  min-height: 2.6rem;
  padding: 0.65rem 0.8rem;
  background: var(--soft);
  border: 1px solid #789383;
  border-radius: 0.5rem;
  font-weight: 700;
}

.settings-grid {
  display: grid; gap: 1rem;
}
@media (min-width: 40rem) {
  .settings-grid.two { grid-template-columns: 1fr 1fr; }
}
