/* Ansel Forms public pages. Colours come from each form's theme.css. */
@font-face { font-family: Manrope; font-weight: 400; font-display: swap; src: url(../fonts/manrope-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 600; font-display: swap; src: url(../fonts/manrope-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(../fonts/manrope-latin-700-normal.woff2) format("woff2"); }
:root { --f-bg: #f4f4f5; --f-card: #ffffff; --f-text: #0a0a0a; --f-primary: #0a0a0a; }
body.af-public { background: var(--f-bg); color: var(--f-text); font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; min-height: 100vh; }
.af-pub-wrap { max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; }
.af-pub-card { background: var(--f-card); border-radius: 16px; padding: 36px; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05); }
.af-pub-narrow { max-width: 480px; margin: 40px auto 0; }
.af-pub-title { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.af-pub-alert { background: #fef2f2; color: #991b1b; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.af-pub-note { background: rgba(0,0,0,.05); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.af-pub-check { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 999px; background: var(--f-primary); color: var(--f-card); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; }
.af-pub-edit { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(0,0,0,.08); }
.af-powered { text-align: center; margin: 20px 0 0; font-size: 12px; }
.af-powered a { color: inherit; opacity: .6; text-decoration: none; }

/* buttons */
.af-pub-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 28px; }
.af-pub-btn, .af-pub-btn-outline { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 24px; border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid var(--f-primary); }
.af-pub-btn { background: var(--f-primary); color: var(--f-card); }
.af-pub-btn:hover { opacity: .9; color: var(--f-card); }
.af-pub-btn:disabled { opacity: .5; cursor: not-allowed; }
.af-pub-btn-outline { background: transparent; color: var(--f-text); border-color: rgba(0,0,0,.2); }
.af-pub-btn-outline:hover { border-color: var(--f-primary); color: var(--f-text); }
[hidden] { display: none !important; }

/* fields */
.af-field { display: flex; flex-direction: column; }
.af-field fieldset { min-width: 0; }
.af-label { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.af-req { color: #b91c1c; }
.af-help { font-size: 13px; opacity: .75; margin-bottom: 6px; }
.af-error { color: #b91c1c; font-size: 13px; margin-top: 6px; font-weight: 600; }
.af-has-error .form-control, .af-has-error .form-select { border-color: #b91c1c; }
.form-control, .form-select { min-height: 44px; border-radius: 10px; border-color: rgba(0,0,0,.18); background-color: #fff; color: #0a0a0a; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--f-primary); box-shadow: 0 0 0 3px rgba(0,0,0,.12); }
.form-check-input:checked { background-color: var(--f-primary); border-color: var(--f-primary); }
.af-f-heading { font-size: 26px; font-weight: 700; margin: 0; }
.af-f-paragraph { margin: 0; opacity: .85; }
.af-f-divider { margin: 4px 0; opacity: .15; }
.af-f-link { color: var(--f-primary); font-weight: 600; }
.af-f-image { max-width: 100%; height: auto; border-radius: 10px; }
.af-imgw-25 { width: 25%; } .af-imgw-50 { width: 50%; } .af-imgw-75 { width: 75%; } .af-imgw-100 { width: 100%; }
.af-qimg { max-width: 100%; max-height: 280px; object-fit: contain; border-radius: 10px; margin-bottom: 10px; align-self: flex-start; }
/* field alignment: places fixed-size items (images, links, choices) */
.af-fa-center { align-items: center; } .af-fa-center .af-qimg { align-self: center; }
.af-fa-right { align-items: flex-end; } .af-fa-right .af-qimg { align-self: flex-end; }
.af-fa-center > .form-control, .af-fa-center > .form-select, .af-fa-right > .form-control, .af-fa-right > .form-select { width: 100%; }

/* choices */
.af-options { display: flex; flex-direction: column; gap: 8px; }
.af-option { padding: 0; margin: 0; display: flex; }
.af-option .form-check-input { margin: 14px 0 0 14px; flex: 0 0 auto; position: relative; z-index: 1; }
.af-option .form-check-label { flex: 1; margin-left: -34px; padding: 10px 14px 10px 44px; border: 1px solid rgba(0,0,0,.14); border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.af-option .form-check-input:checked + .form-check-label { border-color: var(--f-primary); box-shadow: inset 0 0 0 1px var(--f-primary); }
.af-options-img { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.af-options-img .form-check-label { flex-direction: column; align-items: flex-start; }
.af-options-img .form-check-label img { width: 100%; height: 110px; object-fit: contain; border-radius: 8px; }

/* rating */
.af-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.af-star-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.af-stars label { font-size: 34px; line-height: 1; color: rgba(0,0,0,.18); cursor: pointer; padding: 2px; }
.af-stars label:hover, .af-stars label:hover ~ label, .af-star-input:checked ~ label { color: #f59e0b; }
.af-star-input:focus-visible + label { outline: 2px solid var(--f-primary); border-radius: 4px; }

/* scale / NPS */
.af-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.af-scale-btn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(0,0,0,.18); border-radius: 10px; cursor: pointer; font-weight: 600; }
.btn-check:checked + .af-scale-btn { background: var(--f-primary); color: var(--f-card); border-color: var(--f-primary); }
.btn-check:focus-visible + .af-scale-btn { outline: 2px solid var(--f-primary); outline-offset: 2px; }
.af-scale-labels { display: flex; justify-content: space-between; font-size: 12px; opacity: .7; margin-top: 6px; }

/* matrix */
.af-matrix-box { overflow-x: auto; }
.af-matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
.af-matrix th, .af-matrix td { padding: 10px 8px; text-align: center; border-bottom: 1px solid rgba(0,0,0,.08); }
.af-matrix tbody th { text-align: left; font-weight: 600; }
.af-matrix .form-check-input { float: none; margin: 0; width: 1.3em; height: 1.3em; }

/* card style */
.af-progress { height: 6px; background: rgba(0,0,0,.08); border-radius: 999px; margin-bottom: 24px; overflow: hidden; }
.af-progress span { display: block; height: 100%; width: 0; background: var(--f-primary); transition: width .2s; }
.af-cards .af-step { min-height: 160px; }
.af-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 575px) {
  .af-pub-card { padding: 22px; }
  .af-imgw-25, .af-imgw-50 { width: 100%; }
}

/* template preview bar */
.af-preview-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding: 10px 14px; background: #fff; border: 1px solid rgba(0,0,0,.12); border-radius: 12px; font-size: 14px; color: #0a0a0a; }
.af-preview-bar a { color: #0a0a0a; }
.af-pub-btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }

/* quiz results */
.af-quiz-score { margin: 18px auto 0; padding: 18px; border-radius: 14px; background: rgba(0,0,0,.04); max-width: 320px; }
.af-quiz-big { font-size: 34px; font-weight: 700; line-height: 1.1; }
.af-quiz-pct { font-size: 15px; opacity: .7; margin-top: 4px; }
.af-quiz-badge { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.af-quiz-pass { background: #dcfce7; color: #166534; }
.af-quiz-fail { background: #fee2e2; color: #991b1b; }
.af-quiz-answers { margin: 22px 0 0; padding-left: 20px; }
.af-quiz-answers li { margin-bottom: 12px; }
.af-qa-q { font-weight: 600; }
.af-ok .af-qa-q span { color: #15803d; }
.af-bad .af-qa-q span { color: #b91c1c; }
.af-qa-line { font-size: 14px; opacity: .8; }
.af-pub-muted { opacity: .7; }
/* certificate */
.af-cert-page { width: 100%; max-width: 1100px; margin: 0 auto; }
.af-cert-tools { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.af-cert { background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.08); line-height: 0; }
.af-cert-svg { width: 100%; height: auto; display: block; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body.af-public { background: #fff !important; }
  .af-cert-tools, .af-powered { display: none !important; }
  .af-pub-wrap { padding: 0 !important; max-width: none !important; }
  .af-cert { box-shadow: none; }
}
.af-pub-wrap:has(.af-cert-page) { max-width: 1140px; }
/* inside another website */
.af-embedded body.af-public { background: transparent; }
.af-embedded .af-pub-wrap { padding: 8px 8px 16px; }
.af-preview-bar a.af-pub-btn { color: #fff; text-decoration: none; display: inline-flex; align-items: center; }
/* Choice layout: 1, 2 or 3 columns, or spread in one row */
.af-options.af-opt-l2, .af-options.af-opt-l3 { display: grid; gap: 6px 18px; }
.af-options.af-opt-l2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.af-options.af-opt-l3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.af-options.af-opt-lrow { display: flex; flex-wrap: wrap; gap: 6px 22px; }
@media (max-width: 520px) { .af-options.af-opt-l3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Heading and paragraph text, icons and pictures */
.af-f-sub { margin: 6px 0 0; font-size: 15px; opacity: .85; }
/* Bullet lists always read from the left, also inside centered or right aligned text */
.af-f-list { text-align: left; margin: 0 0 8px; padding-left: 22px; max-width: 100%; }
.text-center .af-f-list, .af-intro .af-deco-above .af-f-list, .af-intro .af-deco-below .af-f-list, .af-intro > .af-f-list { width: fit-content; margin-left: auto; margin-right: auto; }
.text-end .af-f-list { width: fit-content; margin-left: auto; margin-right: 0; }
.af-f-list li { margin: 2px 0; }
/* Picture or icon above, below, left or right of the text. Same on phones and computers. */
.af-decobox.af-deco-above, .af-decobox.af-deco-below { display: flex; flex-direction: column; gap: 12px; }
.af-decobox.af-deco-left, .af-decobox.af-deco-right { display: flex; align-items: flex-start; gap: 16px; }
.af-decobox.af-deco-left .af-decotext, .af-decobox.af-deco-right .af-decotext { flex: 1 1 auto; min-width: 0; }
.text-center .af-decobox.af-deco-above, .text-center .af-decobox.af-deco-below { align-items: center; }
.text-end .af-decobox.af-deco-above, .text-end .af-decobox.af-deco-below { align-items: flex-end; }
.af-decobox.af-dalign-left > .af-deco { align-self: flex-start; }
.af-decobox.af-dalign-center > .af-deco { align-self: center; }
.af-decobox.af-dalign-right > .af-deco { align-self: flex-end; }
.af-decobox > .af-decotext { align-self: stretch; }
.af-deco { display: block; flex: 0 0 auto; width: 64px; max-width: 100%; }
.af-deco-img { height: auto; border-radius: 8px; }
.af-deco-icon .af-ficon { display: block; width: 100%; height: auto; }
/* Card style: welcome card, progress count */
.af-progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.af-progress-row .af-progress { flex: 1 1 auto; margin: 0; }
.af-count { font-size: 13px; font-weight: 600; white-space: nowrap; opacity: .75; }
.af-intro { text-align: center; padding: 8px 0; }
.af-intro .af-decobox.af-deco-above, .af-intro .af-decobox.af-deco-below { align-items: center; }
.af-intro .af-f-heading { font-size: 28px; }
.af-intro .af-pub-btn { margin-top: 12px; }
.af-intro .af-deco-left, .af-intro .af-deco-right { text-align: left; }
.af-f-paragraph + .af-f-paragraph, .af-f-list + .af-f-paragraph, .af-f-paragraph + .af-f-list { margin-top: 8px; }
.af-pub-actions[hidden], .af-progress-row[hidden] { display: none !important; }

/* Product and service fields (Books items) */
.af-items { display: flex; flex-direction: column; gap: 10px; }
.af-item { display: flex; align-items: center; gap: 12px; border: 1px solid #e4e4e7; border-radius: 12px; padding: 10px; background: #fff; }
.af-item-off { opacity: .6; }
.af-item-img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: 0 0 64px; }
.af-item-noimg { background: #f4f4f5; display: block; }
.af-item-body { flex: 1 1 auto; min-width: 0; }
.af-item-name { display: block; font-weight: 700; color: #0a0a0a; margin: 0; }
.af-item-desc { font-size: 13px; color: #52525b; }
.af-item-price { font-size: 14px; font-weight: 600; color: #0a0a0a; }
.af-item-price span { font-weight: 400; color: #52525b; }
.af-item-left { display: inline-block; font-size: 12px; font-weight: 600; color: #166534; background: #dcfce7; border-radius: 999px; padding: 1px 8px; margin-top: 2px; }
.af-item-out { color: #991b1b; background: #fee2e2; }
.af-item-qty { flex: 0 0 92px; text-align: center; }
.af-item-qty .form-control { text-align: center; }
.af-item-ql { display: block; font-size: 11px; color: #52525b; }
@media (max-width: 480px) { .af-item-img { width: 48px; height: 48px; flex-basis: 48px; } .af-item-qty { flex-basis: 72px; } }
/* Online payment */
.af-pay-dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; text-align: left; border-top: 1px solid #e4e4e7; padding-top: 12px; margin: 14px 0 0; }
.af-pay-dl dt { color: #52525b; font-weight: 400; }
.af-pay-dl dd { margin: 0; font-weight: 700; }
.af-pay-amount { font-size: 28px; font-weight: 800; margin: 8px 0 16px; }
.af-pay-pick { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 4px; border: 0; padding: 0; }
.af-pay-pick legend { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.af-pay-opt { display: flex; gap: 10px; align-items: center; border: 1px solid #d4d4d8; border-radius: 10px; padding: 12px; font-weight: 700; cursor: pointer; }
.af-pay-opt:has(input:checked) { border: 2px solid var(--f-primary); padding: 11px; }
