/* Besplatni alati za domaćine (/besplatno) */
.bp { max-width: 1080px; margin: 0 auto; padding: 22px 20px 64px; }
.bp-crumbs { font-size: 0.86rem; color: var(--text-muted); }
.bp-crumbs a { color: var(--accent); }
.bp h1 { margin: 14px 0 10px; font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 4.4vw, 2.7rem); line-height: 1.15; color: var(--brand); }
.bp-lead { max-width: 680px; margin: 0 0 26px; color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; }
.bp h2 { font-family: 'DM Sans', 'Noto Sans', sans-serif; }

.bp-tool { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.bp-form, .bp-out { padding: 20px; border: 1px solid var(--sky-line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.bp-f { display: block; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.bp-f > span, .bp-f legend { display: block; margin: 0 0 6px; padding: 0; font-size: 0.86rem; font-weight: 600; color: var(--brand); }
.bp-f input[type="text"], .bp-f input[type="url"], .bp-f input[type="tel"], .bp-f input[type="time"], .bp-f select {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.96rem;
}
.bp-f input:hover, .bp-f select:hover { border-color: var(--accent); }
.bp-f input:focus, .bp-f select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.bp-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 360px) { .bp-time-row { grid-template-columns: minmax(0, 1fr); } }
.bp-check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 0.94rem; line-height: 1.4; cursor: pointer; }
.bp-check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.bp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-chip { position: relative; cursor: pointer; }
.bp-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bp-chip span { display: block; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: var(--text); transition: background 0.14s ease, border-color 0.14s ease; }
.bp-chip:hover span { border-color: var(--accent); }
.bp-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.bp-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.bp-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.bp-btns .btn { flex: 1 1 auto; }
.bp-note { margin: 14px 0 0; font-size: 0.86rem; color: var(--text-muted); line-height: 1.5; }
.bp-note-tight { margin-top: 8px; }
.bp-own + .bp-own { margin-top: 8px; }

.bp-sheet { padding: 30px 28px; border: 1px solid var(--border); border-radius: 20px; background: #fff; color: #162433; box-shadow: var(--shadow-md); }
.bp-sheet-title { margin: 0 0 18px; text-align: center; font-family: 'Playfair Display', serif !important; font-size: 1.6rem; color: #0E2A47; overflow-wrap: anywhere; }
.bp-sheet section h2 { margin: 0 0 10px; font-family: 'Playfair Display', serif; font-size: 1.25rem; color: #0E2A47; }
.bp-sheet section + section { margin-top: 22px; padding-top: 20px; border-top: 1px solid #E5DFD5; }
.bp-sheet ul { margin: 0; padding: 0; list-style: none; }
.bp-sheet li { margin: 0 0 8px; font-size: 0.96rem; line-height: 1.5; overflow-wrap: anywhere; }

/* Nevidljiva kopija lista za mjerenje: ista pravila kao kod ispisa (dolje u @media print) */
.bp-measure { position: absolute; left: -10000px; top: 0; width: 178mm; visibility: hidden; pointer-events: none; color: #162433; }
.bp-measure .bp-sheet-title { margin: 0 0 0.8em; font-size: calc(var(--fs, 13pt) * 1.7); }
.bp-measure > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14mm; }
.bp-measure > div[data-n="3"], .bp-measure > div[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10mm; }
.bp-measure h2:not(.bp-sheet-title) { margin: 0 0 0.55em; font-family: 'Playfair Display', serif; font-size: calc(var(--fs, 13pt) * 1.4); }
.bp-measure ul { margin: 0; padding: 0; list-style: none; }
.bp-measure li { margin: 0 0 0.5em; font-size: var(--fs, 13pt); line-height: 1.38; overflow-wrap: anywhere; }
.bp-measure > div[data-n="1"] li { margin-bottom: 0.75em; }

.bp-msg + .bp-msg { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.bp-msg h2 { margin: 0 0 10px; font-size: 1.1rem; color: var(--brand); }
.bp-msg pre { margin: 0 0 12px; padding: 16px; min-height: 190px; border-radius: 14px; background: var(--sky-soft); color: var(--text); font-family: inherit; font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

.bp-wifi { text-align: center; }
.bp-wifi-name { margin: 0 0 4px; font-family: 'Playfair Display', serif; font-size: 1.5rem; color: #0E2A47; overflow-wrap: anywhere; }
.bp-wifi-h { margin: 0 0 14px; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #166A9C; }
.bp-wifi-qr { display: grid; place-items: center; width: min(280px, 100%); aspect-ratio: 1; margin: 0 auto 16px; padding: 10px; border: 1px solid #E5DFD5; border-radius: 18px; background: #fff; }
.bp-wifi-qr svg { display: block; width: 100%; height: 100%; }
.bp-wifi-qr span { max-width: 190px; font-size: 0.9rem; color: #5C6B7A; line-height: 1.5; }
.bp-wifi-scan { margin: 0 auto 16px; max-width: 420px; font-size: 0.84rem; line-height: 1.6; color: #5C6B7A; }
.bp-wifi-data { display: grid; gap: 10px; margin: 0; }
.bp-wifi-data dt { font-size: 0.78rem; color: #5C6B7A; }
.bp-wifi-data dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }

.bp-text { max-width: 720px; margin: 44px 0 0; }
.bp-text h2 { margin: 28px 0 8px; font-size: 1.2rem; color: var(--brand); }
.bp-text p, .bp-text li { font-size: 1rem; line-height: 1.7; color: var(--text); }
.bp-text p { margin: 0 0 10px; }
.bp-text ul { margin: 0 0 10px; padding-left: 20px; }
.bp-text li { margin: 4px 0; }
.bp-text a { color: var(--accent); text-decoration: underline; }

.bp-more { margin-top: 44px; }
.bp-more h2 { margin: 0 0 14px; font-size: 1.2rem; color: var(--brand); }
.bp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.bp-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--sky-line); border-radius: 18px; background: var(--surface); color: var(--text); transition: border-color 0.14s ease, background 0.14s ease; }
.bp-card:hover { border-color: var(--accent); background: var(--sky-soft); }
.bp-card-ico { font-size: 1.5rem; }
.bp-card strong { font-size: 1.04rem; color: var(--brand); }
.bp-card span:last-child { font-size: 0.92rem; color: var(--text-muted); line-height: 1.5; }

.bp-cta { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; margin-top: 48px; padding: 26px; border-radius: 22px; background: var(--sky-soft); border: 1px solid var(--sky-line); }
.bp-cta > div:first-child { flex: 1 1 340px; }
.bp-cta h2 { margin: 0 0 6px; font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--brand); }
.bp-cta p { margin: 0; line-height: 1.6; color: var(--text); }
.bp-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.bp-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 22px 20px 34px; border-top: 1px solid var(--border); font-size: 0.9rem; }
.bp-foot a { color: var(--text-muted); }
.bp-foot a:hover { color: var(--brand); text-decoration: underline; }
.bp-toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; width: max-content; max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 16px; background: var(--brand); color: #fff; font-size: 0.92rem; font-weight: 600; text-align: center; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
.bp-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .bp-tool { grid-template-columns: minmax(0, 1fr); }
  .bp-sheet { padding: 24px 20px; }
}
@media (max-width: 480px) {
  .bp-cta-btns, .bp-cta-btns .btn { width: 100%; }
}

@media print {
  @page { size: A4; margin: 16mm; }
  html { overflow: visible; }
  body { background: #fff; }
  .nav, .bp-crumbs, .bp h1, .bp-lead, .bp-form, .bp-text, .bp-more, .bp-cta, .bp-foot, .bp-toast, .bp-measure,
  .bp-out > label, .bp-btns { display: none !important; }
  .bp, .bp-tool { display: block; max-width: none; margin: 0; padding: 0; }
  .bp-sheet, .bp-out { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .bp-sheet li { break-inside: avoid; }
  .bp-sheet section h2 { break-after: avoid; }
  #rOut { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14mm; }
  #rOut[data-n="3"], #rOut[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10mm; }
  #rOut section + section { margin: 0; padding: 0; border: 0; }
  #bpSheet.is-multipage #rOut { display: block; }
  #bpSheet.is-multipage #rOut section + section { margin-top: 10mm; }
  #rOut section, .bp-wifi { break-inside: avoid; }
  #bpSheet.is-multipage #rOut section { break-inside: auto; }
  .bp-sheet-title { break-after: avoid; }
  .bp-msg h2 { break-after: avoid; }
  .bp-msg pre { padding: 0; min-height: 0; background: #fff; }
  /* --fs postavlja besplatno.js prema količini teksta, da sve stane na jedan list */
  #rOut ul { margin: 0; padding: 0; }
  #rOut li { font-size: var(--fs, 13pt); line-height: 1.38; margin: 0 0 0.5em; }
  #rOut h2 { font-size: calc(var(--fs, 13pt) * 1.4); margin: 0 0 0.55em; }
  #rOut[data-n="1"] li { margin-bottom: 0.75em; }
  .bp-sheet-title { font-size: calc(var(--fs, 13pt) * 1.7); margin: 0 0 0.8em; }
  .bp-wifi { padding-top: 14mm; }
  .bp-wifi-name { font-size: 26pt; }
  .bp-wifi-h { font-size: 15pt; }
  .bp-wifi-qr { width: 95mm; }
  .bp-wifi-scan { font-size: 11pt; max-width: 130mm; }
  .bp-wifi-data dd { font-size: 17pt; }
}

/* Kućni red iz vodiča: pravilo bez prijevoda na tom jeziku (oznaka izvornog jezika) i upozorenje domaćinu */
.bp-src { font-size: 0.78em; color: #5B6B7C; }
.bp-warn { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #FFF4E5; color: #7A4A00; font-size: 0.88rem; line-height: 1.45; }
@media print { .bp-warn { display: none !important; } }
