/* RobimyWeb · podstrona „Kod QR do opinii Google” (tylko po polsku): formularz, wynik, tabliczka do druku i wiadomości.
   Wspólne elementy (hero, komunikat błędu, lista zalet, karty „co dostajesz”) są w zbadaj.css; pasek pól jak w audycie konkurencji. */

/* ---------- Formularz: jeden pasek z dwoma polami ---------- */
.op-hero .phero__title { max-width: 13ch; }
.op-form { width: 100%; max-width: 1000px; display: grid; gap: 14px; margin-top: 6px; }
.op-form__bar {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; align-items: center;
  padding: 8px; border-radius: 30px; background: var(--surface); box-shadow: var(--shadow);
}
.op-field { position: relative; display: grid; gap: 2px; min-width: 0; padding: 10px 18px; border-radius: 22px; cursor: text; transition: background-color .25s; }
.op-field + .op-field::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--line-2); transition: opacity .25s; }
.op-field:hover, .op-field:focus-within { background: var(--bg); }
.op-field:focus-within { box-shadow: 0 0 0 2px rgba(45,91,255,.35); }
.op-field:hover::before, .op-field:focus-within::before, .op-field:hover + .op-field::before, .op-field:focus-within + .op-field::before { opacity: 0; }
.op-field__label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-field__label i { font-size: 15px; color: var(--accent-ink); }
.op-field__label small { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.op-field input { width: 100%; min-width: 0; height: 30px; padding: 0; border: 0; background: none; outline: none; font: inherit; font-size: 16.5px; color: var(--ink); text-overflow: ellipsis; }
.op-field input::placeholder { color: var(--ink-3); }
.op-field input[aria-invalid="true"] { color: #C42B23; }
.op-form__go { margin-left: 6px; }
.op-form__go i { font-size: 18px; transition: transform .35s var(--ease); }
.op-form__go:hover i { transform: translateX(3px); }

/* ---------- Skąd wziąć link ---------- */
.op-how { width: 100%; max-width: 1000px; display: grid; gap: 12px; padding: clamp(18px, 2.4vw, 24px); border-radius: var(--radius); background: rgba(253,253,254,.72); box-shadow: inset 0 0 0 1px var(--line); }
.op-how h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.op-how h2 i { font-size: 20px; color: var(--accent-ink); }
.op-how ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: oph; }
.op-how li { position: relative; padding-left: 36px; font-size: 15px; line-height: 1.5; color: var(--ink-2); counter-increment: oph; }
.op-how li::before { content: counter(oph); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.op-how b { font-weight: 600; color: var(--ink); }
.op-how code { font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; }
.op-how p { font-size: 14px; line-height: 1.5; color: var(--ink-3); }

/* ---------- Wynik ---------- */
.op-result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 8px; scroll-margin-top: 90px; }
.op-result:focus { outline: none; }
.op-result__head { display: grid; gap: 6px; }
.op-result__head h2 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -.04em; font-weight: 600; }
.op-result__head p { color: var(--ink-2); }
.op-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.op-card { display: grid; align-content: start; gap: 14px; min-width: 0; padding: clamp(18px, 2.6vw, 28px); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.op-card h3, .op-card h4 { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.op-card h3 i, .op-card h4 i { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 20px; }
.op-qr__img { justify-self: center; width: min(100%, 300px); aspect-ratio: 1; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.op-qr__img svg { display: block; width: 100%; height: 100%; }
.op-url { justify-self: center; max-width: 100%; padding: 8px 12px; border-radius: 12px; background: var(--bg); font-family: var(--mono); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); text-align: center; overflow-wrap: anywhere; }
.op-actions { justify-self: center; width: min(100%, 420px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.op-actions .btn { padding: 0 14px; }
.op-card .btn i { font-size: 17px; }
.op-card .btn.is-ok { color: #157A47; }
.op-hint { font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }

/* rozmiar tabliczki: dwa przyciski jak przełącznik narzędzi */
.op-size { justify-self: start; display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.op-size label { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background-color .25s, color .25s; }
.op-size input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.op-size small { font-size: 12.5px; font-weight: 400; opacity: .8; }
.op-size label:has(input:checked) { background: var(--ink); color: #fff; }
.op-size label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.op-tab > .btn { justify-self: start; }

/* ---------- Tabliczka: proporcje A6/A5, rozmiary liter względem szerokości (ten sam układ na ekranie i na papierze) ---------- */
.op-plate-wrap { display: grid; place-items: center; padding: clamp(16px, 3vw, 28px); border-radius: 18px; background: var(--surface-2); }
.op-plate { width: min(100%, 280px); container-type: inline-size; background: #fff; color: #0D1015; box-shadow: 0 18px 40px -22px rgba(28,44,92,.45), 0 0 0 1px rgba(13,16,21,.06); }
.op-plate__in { aspect-ratio: 105 / 148; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqi; padding: 8cqi; text-align: center; }
.op-plate__firm { max-width: 100%; font-size: 4.4cqi; font-weight: 600; line-height: 1.25; letter-spacing: .14em; text-transform: uppercase; color: #454C5A; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-plate__firm[hidden] { display: none; }
.op-plate__h { font-size: 8.4cqi; font-weight: 600; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.op-plate__qr { width: 64cqi; }   /* z białym marginesem 4 modułów w samym SVG (strefa ciszy) */
.op-plate__qr svg { display: block; width: 100%; height: auto; }
.op-plate__cta { max-width: 30ch; font-size: 4.3cqi; line-height: 1.35; color: #2B313B; text-wrap: balance; }
.op-plate__url { max-width: 100%; font-family: var(--mono); font-size: 2.9cqi; line-height: 1.35; color: #646B7B; overflow-wrap: anywhere; }

/* ---------- Gotowe wiadomości ---------- */
.op-msgs { display: grid; gap: 14px; margin-top: 8px; }
.op-msgs__t { font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; letter-spacing: -.03em; }
.op-msgs__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.op-msg h4 { font-size: 17px; }
.op-msg h4 i { width: 34px; height: 34px; font-size: 18px; }
.op-msg__l { margin-bottom: -8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.op-msg textarea, .op-msg input {
  width: 100%; padding: 12px 14px; border: 1px solid #C9CED8; border-radius: 14px; background: var(--bg);
  font: inherit; font-size: 15px; line-height: 1.5; color: var(--ink);
}
.op-msg textarea { min-height: 140px; resize: vertical; }
.op-msg textarea:focus, .op-msg input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(45,91,255,.15); }
.op-msg > .btn, .op-msg__btns { justify-self: start; }
.op-msg__btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Zasady Google ---------- */
.op-rules { display: flex; gap: 14px; padding: 16px 20px; border-radius: 18px; background: #FFF3DD; color: #6B4000; }
.op-rules > i { flex: none; margin-top: 1px; font-size: 22px; color: #9A5B00; }
.op-rules div { display: grid; gap: 6px; min-width: 0; }
.op-rules b { font-size: 15.5px; font-weight: 600; color: #4A2C00; }
.op-rules p { font-size: 14.5px; line-height: 1.55; }
.op-rules a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Co dostajesz: cztery karty ---------- */
.op-what .zb-what__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Responsywność ---------- */
@media (max-width: 1100px) {
  .op-msgs__grid { grid-template-columns: minmax(0, 1fr); }
  .op-what .zb-what__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .op-form__bar { grid-template-columns: minmax(0, 1fr); padding: 8px; border-radius: 26px; }
  .op-field { padding: 10px 16px; border-radius: 18px; }
  .op-field + .op-field::before { left: 16px; right: 16px; top: 0; bottom: auto; width: auto; height: 1px; }
  .op-form__go { margin: 6px 0 0; width: 100%; }
  .op-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .op-what .zb-what__grid { grid-template-columns: minmax(0, 1fr); }
  .op-tab > .btn, .op-msg > .btn, .op-msg__btns { justify-self: stretch; }
  .op-msg__btns .btn { flex: 1 1 auto; }
  .op-size { justify-self: stretch; }
  .op-size label { flex: 1; justify-content: center; padding: 0 10px; }
  .op-rules { flex-direction: column; gap: 8px; padding: 16px; }
}
@media (max-width: 360px) {
  .op-actions { grid-template-columns: minmax(0, 1fr); }
  .op-size small { display: none; }
}

/* ---------- Druk: po utworzeniu kodu drukuje się sama tabliczka (rozmiar strony @page ustawia opinie.js) ---------- */
.op-druk { display: none; }
@media print {
  html.op-gotowe body > :not(#opDruk) { display: none !important; }
  html.op-gotowe body { margin: 0; background: #fff; }
  html.op-gotowe .op-druk { display: block; }
  .op-druk .op-plate { width: 105mm; box-shadow: none; }
  .op-druk .op-plate__in { aspect-ratio: auto; height: 147mm; }
  .op-druk.is-a5 .op-plate { width: 148mm; }
  .op-druk.is-a5 .op-plate__in { height: 209mm; }
}
