/* /assets/apps/apps.css -- shared styles for Pro Link's self-service apps (product, order,
   thank-you and hub pages). Loaded AFTER /_shared.css with a ?v=YYYYMMDD cache-buster;
   bump it on every change (browsers keep CSS 24 h + 7 d stale). Uses _shared.css tokens. */

/* ---------- hero ---------- */
.app-hero { background: linear-gradient(135deg, var(--navy-dark) 0%, #0d4d85 100%); padding: 72px 32px 64px; color: #fff; }
.app-hero-inner { max-width: 1150px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.app-hero--simple .app-hero-inner { grid-template-columns: minmax(0, 1fr); max-width: 820px; text-align: center; }
.app-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(245,166,35,.15); border: 1px solid rgba(245,166,35,.4); border-radius: 100px; padding: 6px 16px; font-size: .8rem; font-weight: 700; color: var(--gold-hero); letter-spacing: .04em; margin-bottom: 18px; }
.app-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; margin: 0 0 18px; color: #fff; }
.app-hero .app-lede { font-size: 1.1rem; line-height: 1.7; color: rgba(255,255,255,.82); margin: 0 0 28px; max-width: 640px; }
.app-hero--simple .app-lede { margin-left: auto; margin-right: auto; }
.app-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.app-hero--simple .app-cta { justify-content: center; }
.app-price-card { background: #fff; color: var(--text); border-radius: var(--r-lg); padding: 28px 26px; box-shadow: var(--sh-xl); }
.app-price-card .price { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--navy); line-height: 1; }
.app-price-card .price small { font-size: 1rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.app-price-card ul { list-style: none; margin: 18px 0 0; padding: 0; }
.app-price-card li { position: relative; padding: 0 0 10px 26px; font-size: 1rem; line-height: 1.55; color: var(--text); }
.app-price-card li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }

/* ---------- sections ---------- */
.app-section { padding: 72px 32px; }
.app-section--off { background: var(--off-white); }
.app-wrap { max-width: 1150px; margin: 0 auto; }
.app-narrow { max-width: 820px; margin: 0 auto; }
.app-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.app-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--text); margin: 0 0 12px; }
.app-head p { font-size: 1.05rem; line-height: 1.7; color: var(--text-muted); margin: 0; }
.app-note { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }

.app-areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.app-areas li { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px 16px 46px; position: relative; font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.45; }
.app-areas li::before { content: ""; position: absolute; left: 18px; top: 19px; width: 14px; height: 14px; border-radius: 50%; background: rgba(11,61,107,.12); box-shadow: inset 0 0 0 4px var(--navy); }

.app-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.app-steps li { counter-increment: step; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 20px; position: relative; }
.app-steps li::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 14px; }
.app-steps h3 { font-size: 1.02rem; font-weight: 700; color: var(--text); margin: 0 0 8px; line-height: 1.35; }
.app-steps p { font-size: 1rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

.app-samples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0 0 28px; }
.app-samples figure { margin: 0; }
.app-samples a { display: block; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--sh-md); background: #fff; }
.app-samples img { display: block; width: 100%; height: auto; }
.app-samples figcaption { font-size: .9rem; color: var(--text-muted); margin-top: 10px; line-height: 1.5; }
.app-center { text-align: center; }

.app-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.app-box { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px 26px; }
.app-box h3 { font-size: 1.15rem; font-weight: 800; color: var(--text); margin: 0 0 14px; }
.app-box p { font-size: 1rem; line-height: 1.65; color: var(--text-muted); margin: 0 0 10px; }
.app-list { list-style: none; margin: 0; padding: 0; }
.app-list li { position: relative; padding: 0 0 12px 28px; font-size: 1rem; line-height: 1.6; color: var(--text); }
.app-list li::before { content: ""; position: absolute; left: 3px; top: .5em; width: 12px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
.app-list--no li::before { width: 12px; height: 12px; top: .35em; border: 0; transform: none; background:
  linear-gradient(45deg, transparent 43%, #c0392b 43%, #c0392b 57%, transparent 57%),
  linear-gradient(-45deg, transparent 43%, #c0392b 43%, #c0392b 57%, transparent 57%); }

/* ---------- FAQ ---------- */
.app-faq { display: flex; flex-direction: column; gap: 12px; }
.app-faq details { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); }
.app-faq summary { cursor: pointer; list-style: none; padding: 20px 52px 20px 24px; font-size: 1rem; font-weight: 700; color: var(--text); position: relative; }
.app-faq summary::-webkit-details-marker { display: none; }
.app-faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.app-faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.app-faq .answer { padding: 0 24px 20px; font-size: 1rem; line-height: 1.7; color: var(--text-muted); }
.app-faq .answer p { margin: 0; }

/* ---------- hub ---------- */
.app-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.app-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px 28px; display: flex; flex-direction: column; box-shadow: var(--sh-sm); }
.app-card .tag { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 10px; }
.app-card h2, .app-card h3 { font-size: 1.3rem; font-weight: 800; color: var(--text); margin: 0 0 10px; line-height: 1.3; }
.app-card p { font-size: 1rem; line-height: 1.65; color: var(--text-muted); margin: 0 0 14px; }
.app-card .price { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin: auto 0 18px; }
.app-card .btn { align-self: flex-start; }

/* ---------- checkout form ---------- */
.checkout { padding: 48px 32px 72px; background: var(--off-white); }
.checkout-wrap { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.checkout h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; color: var(--text); margin: 0 0 8px; line-height: 1.2; }
.checkout-intro { font-size: 1.05rem; color: var(--text-muted); line-height: 1.6; margin: 0 0 24px; }
.checkout-form { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px 28px; }
.checkout-form fieldset { border: 0; margin: 0 0 26px; padding: 0; min-width: 0; }
.checkout-form legend { font-size: 1.1rem; font-weight: 800; color: var(--text); margin: 0 0 14px; padding: 0; }
.checkout-form .legend-note { font-weight: 500; color: var(--text-muted); font-size: .95rem; }
.field { margin: 0 0 16px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-row--3 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.field label { display: block; font-size: .9rem; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.field .req { color: #c0392b; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--text); background: #fff;
  border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 11px 13px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-light); box-shadow: 0 0 0 3px rgba(23,98,168,.15); }
.field [aria-invalid="true"] { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
.field-help { font-size: .85rem; color: var(--text-muted); margin: 6px 0 0; line-height: 1.5; }
.field-counter { float: right; font-weight: 500; color: var(--text-muted); font-size: .8rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 1rem; line-height: 1.5; color: var(--text); margin: 0 0 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; flex: 0 0 auto; accent-color: var(--navy); }
.auth-box { background: var(--off-white); border: 1px solid var(--border); border-left: 4px solid var(--navy); border-radius: var(--r-sm); padding: 16px 18px; font-size: .95rem; line-height: 1.65; color: var(--text); margin: 0 0 14px; }
.auth-box a { color: var(--navy-light); font-weight: 600; }
.checkout-alert { border-radius: var(--r-sm); padding: 12px 14px; font-size: .95rem; line-height: 1.55; margin: 0 0 18px; }
.checkout-alert--error { background: #fdecea; border: 1px solid #f5c2bd; color: #8a1f13; }
.checkout-alert--info { background: #fff7e6; border: 1px solid #f5c26b; color: #7a4b00; }
.checkout-submit { width: 100%; justify-content: center; font-size: 1rem; padding: 15px 28px; }
.checkout-submit[disabled] { opacity: .7; cursor: wait; transform: none; }
.secure-note { font-size: .88rem; color: var(--text-muted); line-height: 1.55; margin: 12px 0 0; text-align: center; }
.turnstile-slot { margin: 6px 0 18px; min-height: 65px; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.checkout-summary { position: sticky; top: 96px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 24px; }
.checkout-summary h2 { font-size: 1.05rem; font-weight: 800; color: var(--text); margin: 0 0 4px; }
.checkout-summary .price { font-size: 2rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; margin: 6px 0 2px; }
.checkout-summary .price-note { font-size: .9rem; color: var(--text-muted); margin: 0 0 18px; }
.checkout-summary h3 { font-size: .95rem; font-weight: 800; color: var(--text); margin: 18px 0 10px; }
.checkout-summary ol { margin: 0; padding: 0 0 0 20px; }
.checkout-summary li { font-size: .95rem; line-height: 1.55; color: var(--text-muted); margin: 0 0 8px; }
.checkout-summary p { font-size: .95rem; line-height: 1.55; color: var(--text-muted); margin: 12px 0 0; }
.checkout-summary a { color: var(--navy-light); font-weight: 600; }

/* ---------- embedded payment step (Authorize.net Accept Hosted in an iframe; built by checkout.js) ---------- */
.pay-step { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 24px 18px; }
.pay-step-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 0 0 6px; }
.pay-step h2 { font-size: 1.25rem; font-weight: 800; color: var(--text); margin: 0; }
.pay-step h2:focus { outline: none; }
.pay-step-lock { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; color: #1e7e34; margin: 0; }
.pay-step-note { font-size: .95rem; color: var(--text-muted); line-height: 1.55; margin: 0 0 14px; }
/* No border, no scroll bars: Authorize.net's compact card form (card fields + Pay button only) sits
   directly in our card. The iframe has scrolling="no" and takes the height Authorize.net reports
   (checkout.js); this default only covers the first moments (and a 900/1100 px fallback kicks in
   if no size message ever arrives). */
.pay-frame-wrap { position: relative; margin: 0 -8px; }
.pay-frame { display: block; width: 100%; height: 600px; border: 0; background: transparent; overflow: hidden; }
.pay-frame-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-size: .95rem; line-height: 1.5; color: var(--text-muted); background: #fff; }
.pay-frame-loading[hidden] { display: none; }
.pay-step-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; margin: 14px 0 0; }
.pay-link { background: none; border: 0; padding: 6px 0; font: inherit; font-size: .92rem; font-weight: 600; color: var(--navy-light); cursor: pointer; text-align: left; }
.pay-link:hover, .pay-link:focus-visible { text-decoration: underline; }
.pay-link--inline { padding: 0; font-size: inherit; color: inherit; text-decoration: underline; }

/* ---------- thank-you / setup pages ---------- */
.app-status { max-width: 760px; margin: 0 auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 36px 32px; }
.app-status h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; color: var(--text); margin: 0 0 14px; line-height: 1.2; }
.app-status h2 { font-size: 1.2rem; font-weight: 800; color: var(--text); margin: 24px 0 10px; }
.app-status p, .app-status li { font-size: 1rem; line-height: 1.7; color: var(--text-muted); }
.app-status p { margin: 0 0 12px; }
.app-status a { color: var(--navy-light); font-weight: 600; }
.order-ref { font-family: "Courier New", monospace; font-weight: 700; color: var(--navy); letter-spacing: .06em; }
.app-spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(11,61,107,.2); border-top-color: var(--navy); border-radius: 50%; animation: app-spin .9s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes app-spin { to { transform: rotate(360deg); } }
.step-box { background: var(--off-white); border-left: 4px solid var(--navy); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 16px 20px; margin: 14px 0; }
.step-box .step-label { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); margin: 0 0 6px; }
.step-box ol { margin: 8px 0 0; padding: 0 0 0 20px; }
.step-box li { margin: 0 0 6px; color: var(--text); }
.step-done, .app-status .step-done { color: #1e7e34; font-weight: 700; }

/* ---------- slim footer for checkout / setup pages ---------- */
.checkout-footer { background: var(--navy-dark); color: rgba(255,255,255,.7); padding: 28px 32px; font-size: .9rem; }
.checkout-footer-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.checkout-footer a { color: rgba(255,255,255,.88); text-decoration: none; }
.checkout-footer a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .app-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app-hero-inner, .checkout-wrap, .app-cols { grid-template-columns: minmax(0, 1fr); }
  .checkout-summary { position: static; }
}
@media (max-width: 700px) {
  .app-hero { padding: 52px 20px 48px; }
  .app-section { padding: 52px 20px; }
  .checkout { padding: 32px 16px 56px; }
  .checkout-form, .app-status { padding: 24px 18px; }
  .pay-step { padding: 20px 12px 14px; }
  .pay-step-head, .pay-step-note { padding: 0 6px; }
  .app-steps, .app-areas, .app-samples, .field-row, .field-row--3 { grid-template-columns: minmax(0, 1fr); }
  .pay-frame { height: 720px; }
  .pay-frame-wrap { margin: 0 -4px; }
  .app-samples { max-width: 420px; margin-left: auto; margin-right: auto; }
  .app-cta { flex-direction: column; align-items: stretch; }
  .app-cta .btn { justify-content: center; }
}
