/* businesscardmakerfree.com — maker tool styles (homepage only). */
.tool-hero { padding-top: 28px; }
.tool-hero .lead { max-width: 760px; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }

/* Card geometry: the tool renders real 350x200 cards. */
.card { display: block; width: 350px; height: 200px; flex: none; }
#tool-preview .card { box-shadow: 0 8px 30px rgba(0,0,0,.14); }
.card .photo-slot img, .card .mono img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .photo-slot.has-img { padding: 0; gap: 0; }
.card .mono.has-img { padding: 0; overflow: hidden; }
.card .qr img { width: 100%; height: 100%; display: block; }

/* Mini previews (picker + showcase): full card scaled down. */
.mini { display: block; width: 147px; height: 84px; overflow: hidden; position: relative; flex: none; }
.mini .card { transform: scale(.42); transform-origin: 0 0; }
.thumb { width: 123px; height: 70px; overflow: hidden; position: relative; flex: none; border: 1px solid var(--line); border-radius: 4px; }
.thumb .card { transform: scale(.35); transform-origin: 0 0; }

/* Tool layout */
.tool-grid { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 24px; }
.tool-grid > * { min-width: 0; }
.tool-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.tool-panel h3 { margin-top: 0; }
.tool-panel .row { margin-bottom: 14px; }
.tool-panel .row:last-child { margin-bottom: 0; }
.preview-col { min-width: 0; }
/* Sticky preview (mirrors the invoice site): on desktop the whole right
   column stays visible while the form scrolls; header is 64px tall. */
@media (min-width: 901px) {
  .preview-col { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; }
}
.preview-stage { display: flex; flex-wrap: wrap; gap: 20px; }
.preview-stage figure { margin: 0; }
.preview-stage figcaption { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.preview-scroll { overflow-x: auto; padding-bottom: 6px; }
.status { font-size: 14px; color: var(--muted); min-height: 22px; margin-top: 10px; }
.status.ok { color: var(--green); }

/* Template picker */
.picker-group { margin-bottom: 26px; }
.picker-group > h3 { margin-bottom: 4px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-top: 12px; }
.tpl-pick { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; font: inherit; }
.tpl-pick:hover { border-color: var(--accent); }
.tpl-pick.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37,99,235,.35); }
.tpl-pick .mini { margin: 0 auto; }
.tpl-pick .tname { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin-top: 8px; line-height: 1.3; }
.tpl-pick .tcat { display: block; font-size: 12px; color: var(--muted); }

/* Color + font editors */
.role-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.role-row .role-label { width: 92px; font-size: 13px; font-weight: 700; color: var(--navy); flex: none; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cfcfc8; cursor: pointer; padding: 0; flex: none; }
.swatch.active { box-shadow: 0 0 0 2px var(--accent); }
.hex-wrap { display: flex; align-items: center; gap: 6px; }
.hex-wrap input[type="text"] { width: 86px; padding: 6px 8px; font-size: 13px; }
.hex-wrap input[type="color"] { width: 34px; height: 30px; padding: 2px; border: 1px solid #cfcfc8; border-radius: 6px; background: #fff; cursor: pointer; }
.font-row { display: flex; gap: 16px; flex-wrap: wrap; }
.font-row .frow { flex: 1 1 200px; }

/* Actions / share / QR */
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.share-out { margin-top: 18px; }
.share-out .link-row { display: flex; gap: 8px; }
.share-out .link-row input { flex: 1; min-width: 0; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 16px; }
.qr-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-align: center; }
.qr-box .qr-img { width: 132px; height: 132px; margin: 8px auto; }
.qr-box .qr-img img { width: 100%; height: 100%; display: block; }
.qr-box p { font-size: 13px; color: var(--muted); margin: 0; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(27,42,74,.55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal-backdrop[hidden] { display: none; }
.modal { background: #fff; border-radius: 14px; max-width: 520px; width: 100%; padding: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h3 { margin-top: 0; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.modal-actions .btn { width: 100%; }

/* My cards */
.mycards-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.mycard { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 12px; flex-wrap: wrap; }
.mycard .meta { flex: 1 1 160px; min-width: 0; }
.mycard .meta .mname { font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.mycard .meta .msub { font-size: 13px; color: var(--muted); }
.mycard .macts { display: flex; gap: 8px; flex-wrap: wrap; }

/* Showcase / homepage sections */
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.showcase-card { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; color: var(--ink); }
.showcase-card:hover { text-decoration: none; border-color: var(--accent); }
.showcase-card .mini { margin: 0 auto; }
.showcase-card .tname { display: block; font-weight: 700; color: var(--navy); margin-top: 10px; }
.showcase-card .tcat { display: block; font-size: 13px; color: var(--muted); }
.steps { counter-reset: step; }
.steps li { list-style: none; position: relative; padding-left: 46px; margin-bottom: 18px; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.steps { padding-left: 0; }
.check-list { list-style: none; padding-left: 0; }
.check-list li { padding-left: 26px; position: relative; margin-bottom: 10px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .preview-stage { gap: 14px; }
  .preview-scroll { overflow-x: visible; }
  .preview-stage figure { transform: scale(.94); transform-origin: 0 0; margin-bottom: -12px; }
  .tool-panel { padding: 16px; }
}
