/* TrueCover flyer tool — UI chrome (Variation 1 "Sidebar", white & clean). */
:root {
  --blue: #2761eb;
  --blue-dark: #1a4bc7;
  --ink: #0b1120;
  --muted: #6b7280;
  --border: #e6e9f2;
  --bg: #f5f7fb;
  --panel: #ffffff;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.app { display: grid; grid-template-columns: 380px 1fr; min-height: 100vh; }

/* ---------- controls panel ---------- */
.panel {
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 30px 28px;
  display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 22px; display: block; }
.brand .pill {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--blue); background: #eef3ff; padding: 5px 10px; border-radius: 999px;
}
.lead h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.lead p { font-size: 13.5px; line-height: 1.5; color: var(--muted); margin: 0; }

.field { display: flex; flex-direction: column; gap: 9px; }
.field > label,
.dl-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

/* flyer type cards */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg button {
  appearance: none; border: 1.5px solid var(--border); background: #fff; color: var(--ink);
  border-radius: 14px; padding: 13px; font: inherit; cursor: pointer; transition: all 0.15s;
  display: flex; flex-direction: column; gap: 3px; text-align: left;
}
.seg button b { font-size: 14px; font-weight: 700; }
.seg button .sub { font-size: 11px; font-weight: 500; color: var(--muted); }
.seg button:hover { border-color: #c7d2f0; }
.seg button[aria-pressed="true"] { border-color: var(--blue); background: #f3f7ff; box-shadow: 0 0 0 3px rgba(39,97,235,0.12); }
.seg button[aria-pressed="true"] .sub { color: var(--blue-dark); }

/* inputs */
.panel input {
  width: 100%; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 12px 14px; font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.panel input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39,97,235,0.12); }

/* download buttons (each explains what it's for) */
.actions { display: flex; flex-direction: column; gap: 10px; }
.btn {
  appearance: none; border: none; border-radius: 13px; padding: 13px 16px;
  font: inherit; cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; gap: 13px; text-align: left;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn .l { display: flex; flex-direction: column; line-height: 1.3; font-weight: 700; font-size: 14.5px; }
.btn .l small { font-size: 11.5px; font-weight: 500; opacity: 0.82; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: #c7d2f0; background: #fafbff; }
.btn:disabled { opacity: 0.55; cursor: progress; }

.note { font-size: 12px; line-height: 1.55; color: var(--muted); border-top: 1px solid var(--border); padding-top: 16px; margin-top: auto; }
.note strong { color: var(--ink); }

/* ---------- preview stage ---------- */
.stage {
  padding: 40px; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 1px 1px, rgba(11,17,32,0.05) 1px, transparent 0) 0 0 / 22px 22px,
    var(--bg);
}
/* shadow lives on the (unscaled, unfiltered) sized box so the scaled preview
   inside renders at full screen resolution — no soft bitmap on hi-DPI screens */
.fit { position: relative; box-shadow: 0 32px 74px rgba(11,17,32,0.22); }
.flyer-scaler {
  position: absolute; top: 0; left: 0;
  transform-origin: top left;
}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .panel { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .note { margin-top: 0; }
  .stage { padding: 24px 16px 60px; align-items: flex-start; }
}
