/* ==========================================================================
   Advertise / campaign request page
   Light working area for long-form input, dark title band to tie in with
   the rest of the site. Kept deliberately plain: flat panels, 1px rules,
   3px radius (same as the live site's buttons), one accent colour.
   ========================================================================== */

body[data-page="book"] {
  --ink: #1d1d1d;
  --ink-2: #4a4744;
  --ink-3: #77736e;
  --rule: #dedad4;
  --rule-2: #c8c3bc;
  --paper: #ffffff;
  --canvas: #f2f0ec;
  --focus: #1d1d1d;
  --err: #c4122f;
  background: var(--canvas);
}

/* ---------- Header tweaks for this page ---------- */
body[data-page="book"] .live-bar a { padding: 8px 48px; font-size: 14px; }
body[data-page="book"] .main-nav a.is-current { color: var(--bfn-red); }
body[data-page="book"] .brand-mark img { width: 46px; height: 46px; }

/* ---------- Title band ---------- */
.book .page-hero {
  background: #141414;
  color: #fff;
  padding: 34px 0 0;
  border-bottom: 0;
}
.book .crumbs { font-size: 13px; color: #9c978f; margin: 0 0 14px; }
.book .crumbs a { color: #cfcac2; }
.book .crumbs a:hover { color: #fff; text-decoration: underline; }
.book .page-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.book .lede { color: #c9c4bc; font-size: 16px; max-width: 640px; margin: 0 0 26px; }

.steps-bar { list-style: none; margin: 0; padding: 0; display: flex; gap: 32px; border-top: 1px solid #2c2c2c; }
.steps-bar li {
  padding: 14px 0 12px;
  font-size: 14px;
  color: #8d8881;
  border-bottom: 3px solid transparent;
  display: flex; align-items: center; gap: 8px;
}
.steps-bar li span {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid #5a5651; font-size: 11px; font-weight: 700;
}
.steps-bar li.is-current { color: #fff; border-bottom-color: var(--bfn-red); font-weight: 600; }
.steps-bar li.is-current span { background: #fff; color: #141414; border-color: #fff; }
.steps-bar li.is-done { color: #cfcac2; }
.steps-bar li.is-done span { background: transparent; color: transparent; border-color: #8d8881; position: relative; }
.steps-bar li.is-done span::after { content: "✓"; color: #cfcac2; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; }

/* ---------- Layout ---------- */
.book-body { color: var(--ink); padding: 32px 0 80px; }
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.book-main { min-width: 0; }

.book .form-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 24px 28px 26px;
  margin: 0 0 16px;
}
.book .form-card h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 18px;
}
.book .form-card h2 .opt { font-weight: 400; font-size: 14px; color: var(--ink-3); }
.book .section-note { font-size: 14px; color: var(--ink-3); margin: -8px 0 16px; }
.book .form-card .section-note:last-child { margin-bottom: 0; }

/* ---------- Placement list ---------- */
.option-list { border: 1px solid var(--rule-2); border-radius: 3px; margin: 0; padding: 0; }
.book .placement-option { position: relative; }
.book .placement-option + .placement-option { border-top: 1px solid var(--rule); }
.book .placement-option input { position: absolute; opacity: 0; pointer-events: none; }
.book .placement-option label {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: start;
  padding: 16px 18px; cursor: pointer; background: #fff;
  border-left: 3px solid transparent;
  transition: background-color .15s;
}
.book .placement-option label { height: auto; border-top: 0; border-right: 0; border-bottom: 0; border-radius: 0; box-shadow: none; transform: none; flex-direction: initial; }
.book .placement-option label:hover { background: #faf9f7; border-color: transparent; transform: none; }
.book .placement-option input:checked + label { background: #fdf5f6; border-left-color: var(--bfn-red); box-shadow: none; }
.book .placement-option input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: -2px; }
.book .radio {
  width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  border: 1.5px solid #8f8a83; background: #fff; position: relative;
}
.book .placement-option input:checked + label .radio { border-color: var(--bfn-red); }
.book .placement-option input:checked + label .radio::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--bfn-red);
}
.book .opt-name { display: block; font-weight: 700; font-size: 16px; color: var(--ink); }
.book .opt-desc { display: block; font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.book .opt-price { font-weight: 700; font-size: 17px; color: var(--ink); white-space: nowrap; text-align: right; }
.book .opt-price small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
.book .rate-note { font-size: 13px; color: var(--ink-3); margin: 10px 0 0; }

/* ---------- Fields ---------- */
.book .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.book .field { display: flex; flex-direction: column; gap: 5px; }
.book .span-2 { grid-column: span 2; }
.book .field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.book .req { color: var(--err); }
.book .opt { color: var(--ink-3); font-weight: 400; }
.book .field input,
.book .field textarea {
  width: 100%; min-height: 42px; padding: 9px 11px;
  font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--rule-2); border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
  transition: border-color .15s;
}
.book .field textarea { min-height: 104px; line-height: 1.5; resize: vertical; }
.book .field input::placeholder, .book .field textarea::placeholder { color: #a8a39c; }
.book .field input:hover, .book .field textarea:hover { border-color: #9f9a93; }
.book .field input:focus, .book .field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.book .field input[type="date"] { color-scheme: light; }
.book .field .error-msg { display: none; font-size: 13px; color: var(--err); }
.book .field.has-error input, .book .field.has-error textarea { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.book .field.has-error .error-msg { display: block; }
.book .field-foot { display: flex; justify-content: space-between; gap: 12px; }
.book .char-count { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.book .hint-line { margin: -4px 0 0; font-size: 13px; color: var(--ink-3); }
.book .hint-line strong { color: var(--ink); }
.book .group-error { display: none; color: var(--err); font-size: 13px; margin: 8px 0 0; }
.book .group-error.is-visible { display: block; }

.book .form-error-banner {
  display: none; margin: 0 0 16px; padding: 12px 16px;
  background: #fff4f5; border: 1px solid #f0b9c2; border-left: 4px solid var(--err);
  color: #6e1020; font-size: 14px; border-radius: 3px;
}
.book .form-error-banner.is-visible { display: block; }

/* ---------- File input ---------- */
.book .dropzone {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 16px; border: 1px dashed #b5b0a8; border-radius: 3px; background: #faf9f7;
  text-align: left; cursor: pointer;
}
.book .dropzone:hover, .book .dropzone.is-drag { border-color: var(--ink); background: #f5f3ef; }
.book .dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.book .fake-btn {
  display: inline-block; padding: 7px 14px; font-size: 14px; font-weight: 600;
  background: #fff; border: 1px solid var(--rule-2); border-radius: 3px; color: var(--ink);
}
.book .dz-text { font-size: 14px; color: var(--ink-2); }
.book .dz-spec { flex-basis: 100%; font-size: 13px; color: var(--ink-3); }
.book .file-preview {
  display: none; align-items: center; gap: 14px; padding: 12px;
  border: 1px solid var(--rule-2); border-radius: 3px; background: #faf9f7;
}
.book .file-preview.is-visible { display: flex; }
.book .fp-media { width: 96px; aspect-ratio: 16 / 9; flex-shrink: 0; background: #e7e4df; overflow: hidden; border-radius: 2px; }
.book .fp-media img, .book .fp-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.book .fp-info { flex: 1; min-width: 0; }
.book .fp-name { font-weight: 600; font-size: 14px; word-break: break-all; }
.book .fp-meta { font-size: 13px; color: var(--ink-3); }
.book .fp-actions { display: flex; gap: 14px; }
.book #formatNote { margin-top: 12px; margin-bottom: 2px; }

.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--ink); text-decoration: underline; cursor: pointer; }
.link-btn.danger { color: var(--err); }

/* ---------- Actions ---------- */
.book .form-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 20px; }
.book .btn { border-radius: 3px; min-height: 46px; font-size: 15px; letter-spacing: .03em; }
.book .btn-primary { box-shadow: none; }
.book .btn-primary:hover { transform: none; box-shadow: none; }
.book .btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--rule-2); }
.book .btn-secondary:hover { border-color: var(--ink); }
.back-link { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.back-link:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Review / success tables ---------- */
.book .review-grid { display: block; margin: 0; border-top: 1px solid var(--rule); }
.book .review-item { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.book .review-item dt { font-size: 14px; color: var(--ink-3); text-transform: none; letter-spacing: 0; margin: 0; }
.book .review-item dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); word-break: break-word; }
.book .review-item dd.muted { font-weight: 400; color: var(--ink-3); }

.book .ack { display: flex; gap: 12px; align-items: flex-start; padding: 0; background: none; border: 0; font-size: 15px; color: var(--ink); cursor: pointer; }
.book .ack input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--bfn-red); flex-shrink: 0; }
.book .ack.has-error { color: var(--err); }

.book .success-card { text-align: left; padding: 28px; }
.book .success-card h2 { display: flex; gap: 10px; align-items: center; font-size: 20px; }
.book .tick { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #1f8a3c; color: #fff; font-size: 14px; flex-shrink: 0; }
.book .success-card > p { color: var(--ink-2); margin: 0 0 8px; }
.book .ref-line { margin: 14px 0 20px !important; }
.book .ref-number { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; font-weight: 700; color: var(--ink); background: #f2f0ec; border: 1px solid var(--rule-2); padding: 3px 8px; border-radius: 3px; margin: 0; display: inline; letter-spacing: .03em; }
.book .success-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; justify-content: flex-start; }

/* ---------- Estimate sidebar ---------- */
.book .summary { position: sticky; top: calc(var(--header-h) + 16px); }
.book .summary-card { background: #fff; border: 1px solid var(--rule); border-top: 3px solid var(--bfn-red); border-radius: 3px; padding: 18px 20px 20px; overflow: visible; }
.book .summary-card h2 { font-family: var(--font-body); font-size: 17px; font-weight: 700; margin: 0 0 10px; color: var(--ink); }
.book .sum-table { margin: 0; }
.book .sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #ece9e4; font-size: 14px; }
.book .sum-row dt { color: var(--ink-3); }
.book .sum-row dd { margin: 0; text-align: right; font-weight: 600; color: var(--ink); }
.book .sum-message { display: none; margin: 12px 0 0; font-size: 13px; color: var(--ink-2); background: #f6f4f0; padding: 8px 10px; border-radius: 3px; border: 0; }
.book .sum-message.is-visible { display: block; }
.book .sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 2px; font-size: 15px; font-weight: 600; }
.book .sum-total strong { font-size: 26px; font-weight: 700; color: var(--ink); font-family: var(--font-body); }
.book .sum-formula { font-size: 12px; color: var(--ink-3); margin: 0 0 12px; }
.book .sum-disclaimer { font-size: 12px; line-height: 1.5; color: var(--ink-2); margin: 0; padding-top: 12px; border-top: 1px solid #ece9e4; }
.book .help-box { margin-top: 14px; padding: 0 4px; font-size: 14px; color: var(--ink-2); }
.book .help-box h3 { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.book .help-box p { margin: 0; }
.book .help-box a { color: var(--ink); text-decoration: underline; }

/* ---------- Footer ---------- */
body[data-page="book"] .site-footer { padding: 24px 0; }
body[data-page="book"] .footer-bottom { border-top: 0; padding-top: 0; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

/* ---------- Mobile estimate bar ---------- */
body[data-page="book"] .mobile-total { display: none; }

@media (max-width: 1080px) {
  .book-grid { grid-template-columns: 1fr; }
  .book .summary { position: static; }
  body[data-page="book"] .mobile-total {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff; color: var(--ink); border-top: 1px solid var(--rule-2);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .06); backdrop-filter: none;
  }
  body[data-page="book"] .mobile-total .mt-label { font-size: 12px; color: var(--ink-3); }
  body[data-page="book"] .mobile-total .mt-amount { font-family: var(--font-body); font-size: 19px; font-weight: 700; color: var(--ink); }
  body[data-page="book"].is-complete .mobile-total { display: none; }
  body[data-page="book"] .site-footer { padding-bottom: 84px; }
}

@media (max-width: 680px) {
  .book .page-hero { padding-top: 24px; }
  .book .page-hero h1 { font-size: 26px; }
  .book .lede { font-size: 15px; margin-bottom: 18px; }
  .steps-bar { gap: 18px; overflow-x: auto; }
  .steps-bar li { font-size: 13px; white-space: nowrap; }
  .book-body { padding: 16px 0 60px; }
  .book .form-card { padding: 18px 16px 20px; border-left: 0; border-right: 0; border-radius: 0; margin-left: -16px; margin-right: -16px; }
  .book .field-grid { grid-template-columns: 1fr; }
  .book .span-2 { grid-column: auto; }
  .book .placement-option label { grid-template-columns: 20px 1fr; padding: 14px; }
  .book .opt-price { grid-column: 2; text-align: left; }
  .book .opt-price small { display: inline; margin-left: 4px; }
  .book .review-item { grid-template-columns: 1fr; gap: 2px; }
  .book .form-actions { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .book .form-actions .btn { width: 100%; }
  .book .file-preview { flex-wrap: wrap; }
  .book .success-actions { flex-direction: column; align-items: stretch; text-align: center; }
}
