/* PETRO EXIR ATLAS | Shared form experience v2
   Scoped page design. Uses base.html tokens; no legacy .atlas-wizard stylesheet.
   Form controls and containers are intentionally unfilled (no enclosing card). */
.pea-flow-page {
  --pf-canvas: var(--pea-canvas, #f7f9fc);
  --pf-heading: var(--pea-heading, #102c4d);
  --pf-text: var(--pea-text, #223246);
  --pf-muted: var(--pea-secondary, #64748a);
  --pf-stroke: var(--pea-stroke-strong, #d4dfea);
  --pf-brand: var(--pea-brand, #123c6a);
  --pf-on-brand: var(--pea-brand-ink, #fff);
  --pf-gold: var(--pea-gold-line, #c89b3c);
  min-width: 0;
  padding-block: clamp(18px, 2.7vw, 44px) 80px;
  background: transparent;
  color: var(--pf-text);
}
.pea-flow-page *, .pea-flow-page *::before, .pea-flow-page *::after { box-sizing: border-box; }
.pea-flow-page :is(button, a, input, textarea, select):focus-visible {
  outline: 2px solid var(--pf-gold); outline-offset: 3px;
}
.pea-flow-page .bi { display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-size: 17px; }

/* Consistent desktop layout; all three forms share the same rhythm. */
.pea-flow-layout {
  display: grid;
  grid-template-columns: minmax(230px, .65fr) minmax(0, 1.35fr);
  gap: clamp(36px, 5.6vw, 110px);
  align-items: start;
  max-width: 1540px;
  margin-inline: auto;
}
.pea-flow-layout > *, .pea-flow-body { min-width: 0; }
.pea-flow-aside { max-width: 390px; padding-block-start: 8px; }
.pea-flow-kicker { margin: 0 0 8px; color: var(--pea-accent-ink, #826121); font: 700 10px/1.5 Arial,sans-serif; letter-spacing: .11em; }
.pea-flow-aside h1 { margin: 0; color: var(--pf-heading); font-size: clamp(21px, 1.65vw, 27px); font-weight: 775; line-height: 1.55; }
.pea-flow-lead { margin: 10px 0 0; max-width: 39ch; color: var(--pf-muted); font-size: 12.8px; line-height: 1.95; }
.pea-flow-context { margin: 14px 0 0; color: var(--pf-heading); font-size: 12.5px; font-weight: 650; line-height: 1.8; }
.pea-flow-steps { list-style: none; display: grid; gap: 17px; margin: 32px 0 0; padding: 0; }
.pea-flow-step-label { display: flex; align-items: center; gap: 14px; min-width: 0; color: var(--pf-muted); font-size: 12.2px; font-weight: 500; }
.pea-flow-step-label b { display: inline-block; flex: 0 0 22px; width: 22px; color: var(--pf-muted); font: 700 11px/1.6 Arial,sans-serif; background: none; text-align: center; }
.pea-flow-step-label.is-active { color: var(--pf-heading); font-weight: 750; }
.pea-flow-step-label.is-active b { color: var(--pea-accent-ink, #826121); }
.pea-flow-body { width: 100%; max-width: 840px; }

/* Stop legacy rules from drawing the panel visible in the supplied screenshots. */
body.pea-app .pea-flow-page :is(.pea-flow-body, .pea-flow-form, .pea-flow-stage, .pea-flow-fields) {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.pea-app .pea-flow-page .pea-flow-form {
  display: block; width: 100%; max-width: none; min-width: 0;
  margin: 0; padding: 0 !important; transform: none; filter: none;
  perspective: none; contain: none;
}
.pea-flow-header { margin: 0 0 24px; padding: 0; }
.pea-flow-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 13px; }
.pea-flow-count { color: var(--pf-muted); font: 600 11px/1.5 var(--font, Modam, sans-serif); }
.pea-flow-progress { display: flex; align-items: center; gap: 5px; min-height: 4px; }
.pea-flow-progress span { width: 18px; height: 4px; background: var(--pea-stroke, #e4eaf1); border-radius: 99px; transition: background-color .18s ease; }
.pea-flow-progress span.is-active { background: var(--pf-brand); }
.pea-flow-header h2 { margin: 0; color: var(--pf-heading); font-size: 17px; line-height: 1.62; font-weight: 755; }
.pea-flow-subtitle { margin: 4px 0 0; color: var(--pf-muted); font-size: 12px; line-height: 1.8; }
.pea-flow-stage[hidden], .pea-flow-action[hidden], .pea-flow-error[hidden], .pea-flow-date[hidden], .pea-flow-upload-remove[hidden] { display: none !important; }

/* Inputs sit on the page canvas. Only control outlines remain. */
.pea-flow-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 19px 17px; align-items: start; }
.pea-flow-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; color: var(--pf-heading); }
.pea-flow-field--wide { grid-column: 1 / -1; }
.pea-flow-field > span:first-child, .pea-flow-field > .pea-flow-label, .pea-flow-file > .pea-flow-label {
  color: var(--pf-heading); font-size: 12.4px; line-height: 1.6; font-weight: 660;
}
.pea-flow-required { color: var(--pea-accent-ink, #826121); padding-inline-start: 4px; }
body.pea-app .pea-flow-page .pea-flow-field :is(input:not([type='radio']):not([type='file']), textarea, select) {
  appearance: auto; display: block; width: 100%; min-width: 0; min-height: 49px; margin: 0;
  padding: 11px 14px; background: transparent !important; border: 1px solid var(--pf-stroke) !important;
  border-radius: 12px; color: var(--pf-text); box-shadow: none !important;
  font: 450 13.2px/1.65 var(--font, Modam, sans-serif);
  transition: border-color .16s ease;
}
html[lang^='en'] body.pea-app .pea-flow-page .pea-flow-field :is(input, textarea, select) { font-family: Inter,'Segoe UI',Arial,sans-serif; }
body.pea-app .pea-flow-page .pea-flow-field textarea { min-height: 134px; resize: vertical; }
body.pea-app .pea-flow-page .pea-flow-field :is(input, textarea, select):focus { border-color: var(--pf-gold) !important; outline: 0; }
body.pea-app .pea-flow-page .pea-flow-field [aria-invalid='true'] { border-color: #bf655c !important; }
.pea-flow-field-hint { color: var(--pf-muted); font-size: 11.2px; line-height: 1.7; }
.pea-flow-field-error, .pea-flow-error, .pea-flow-server-errors { color: #ca6a60; font-size: 11.6px; line-height: 1.8; }
.pea-flow-error { margin: 15px 0 0; }
.pea-flow-server-errors { margin: 17px 0 0; }
.pea-flow-server-errors ul { margin: 3px 0; padding-inline-start: 18px; }

.pea-flow-choice-grid { grid-column: 1/-1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.pea-flow-choice { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 61px; padding: 12px 13px; cursor: pointer;
  color: var(--pf-text); background: transparent; border: 1px solid var(--pf-stroke); border-radius: 12px; font-size: 12.4px; font-weight: 570; }
.pea-flow-choice:has(input:checked) { border-color: var(--pf-gold); color: var(--pf-heading); }
.pea-flow-choice input { flex: 0 0 17px; width: 17px; height: 17px; margin: 0; accent-color: var(--pf-brand); }
.pea-flow-choice span { min-width: 0; }
.pea-flow-date { grid-column: 1 / -1; max-width: 330px; }
.pea-flow-file { position: relative; grid-column: 1 / -1; min-width: 0; }
.pea-flow-file > .pea-flow-label { display: block; margin-block-end: 8px; }
.pea-flow-file-input { position: absolute; opacity: 0; width: 1px; height: 1px; inset-block-start: 50px; inset-inline-start: 22px; }
.pea-flow-upload { display: flex; align-items: center; min-height: 104px; gap: 14px; padding: 17px 19px;
  background: transparent; border: 1px dashed var(--pf-stroke); border-radius: 13px; color: var(--pf-heading); cursor: pointer; }
.pea-flow-upload:hover, .pea-flow-file:focus-within .pea-flow-upload { border-color: var(--pf-gold); }
.pea-flow-upload .bi { color: var(--pea-accent-ink, #826121); font-size: 25px; }
.pea-flow-upload strong { display: block; font-size: 12.8px; font-weight: 710; overflow-wrap: anywhere; }
.pea-flow-upload small { display: block; margin-block-start: 4px; color: var(--pf-muted); font-size: 10.9px; }
.pea-flow-upload-remove { display: inline-flex; align-items: center; gap: 7px; margin: 9px 0 0; padding: 4px 0;
  border: 0; background: transparent; color: var(--pf-muted); font-size: 11.8px; cursor: pointer; }

/* Same physical footprint and safe-area position as the base mobile dock. */
.pea-flow-actions { --pf-brand: var(--pea-brand, #123c6a); --pf-on-brand: var(--pea-brand-ink, #fff); --pf-muted: var(--pea-secondary, #64748a); --pf-heading: var(--pea-heading, #102c4d); display: flex; align-items: center; gap: 11px; margin-block-start: 32px; }
.pea-flow-action { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 45px; padding: 10px 17px; border: 0; border-radius: 12px; white-space: nowrap;
  font: 730 12.5px/1.5 var(--font, Modam, sans-serif); cursor: pointer; touch-action: manipulation;
  transition: background-color .16s ease, opacity .16s ease; }
html[lang^='en'] .pea-flow-action { font-family: Inter,'Segoe UI',Arial,sans-serif; }
.pea-flow-action--primary { min-width: 162px; margin-inline-start: auto; background: var(--pf-brand); color: var(--pf-on-brand); }
.pea-flow-action--primary:hover { background: var(--pea-brand-hover, var(--pf-brand)); }
.pea-flow-action--secondary { background: var(--pea-panel-soft, #f0f4f9); color: var(--pf-heading); }
.pea-flow-action--quiet { color: var(--pf-muted); background: transparent; text-decoration: none; }
.pea-flow-action[disabled] { opacity: .55; cursor: wait; }

/* Company offices: content-first typography, no redundant tiles. */
.pea-flow-extra { margin-block-start: 42px; }
.pea-flow-extra h2 { margin: 0 0 15px; color: var(--pf-heading); font-size: 15px; font-weight: 755; }
.pea-flow-offices { display: grid; gap: 18px; max-width: 440px; }
.pea-flow-office { min-width: 0; padding: 0; }
.pea-flow-office h3 { margin: 0 0 6px; color: var(--pf-heading); font-size: 13px; font-weight: 750; }
.pea-flow-office p { margin: 0 0 10px; color: var(--pf-muted); font-size: 12px; line-height: 1.9; }
.pea-flow-office-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 17px; }
.pea-flow-office-actions a { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--pf-heading); font-size: 11.8px; overflow-wrap: anywhere; }
.pea-flow-office-actions a:hover { color: var(--pea-accent-ink, #826121); }
.pea-flow-office-actions .bi { font-size: 15px; }
.pea-flow-layout--contact { grid-template-columns: minmax(0,1.15fr) minmax(260px,.85fr); gap: clamp(36px, 5.2vw, 100px); }
.pea-flow-layout--contact .pea-flow-body { max-width: 780px; }
.pea-flow-contact-intro { margin: 0 0 22px; }
.pea-flow-contact-intro h1 { font-size: clamp(21px,1.7vw,27px); }
.pea-flow-contact-side { padding-block-start: 6px; }
.pea-flow-contact-side .pea-flow-extra { margin-block-start: 0; }

/* The base dock switches at 1190px. Use exactly that breakpoint for form actions. */
@media (max-width: 1190px) {
  body.pea-app #content:has(.pea-flow-page) { padding-bottom: 0 !important; }
  .pea-flow-page { padding-block: 8px calc(126px + env(safe-area-inset-bottom, 0px)); }
  .pea-flow-layout, .pea-flow-layout--contact { display: flex; flex-direction: column; max-width: none; gap: 0; }
  .pea-flow-aside { width: 100%; max-width: none; margin: 0; padding: 0; }
  .pea-flow-aside h1, .pea-flow-kicker, .pea-flow-steps, .pea-flow-lead { display: none; }
  .pea-flow-context { margin: 2px 0 15px; font-size: 12px; line-height: 1.7; }
  .pea-flow-body { width: 100%; max-width: none; }
  .pea-flow-header { margin: 8px 0 21px; }
  .pea-flow-header h2 { font-size: 15.5px; }
  .pea-flow-fields { gap: 17px 14px; }
  .pea-flow-contact-intro { display: none; }
  .pea-flow-contact-side { width: 100%; margin-block-start: 44px; padding: 0; }
  .pea-flow-offices { max-width: none; gap: 19px; }
  body.pea-app .pea-flow-page .pea-flow-actions, body.pea-app > .pea-flow-actions {
    position: fixed !important; z-index: 160; inset: auto !important;
    left: 50% !important; right: auto !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    display: flex; align-items: stretch; justify-content: center; flex-wrap: nowrap;
    transform: translateX(-50%) !important;
    width: min(calc(100% - 22px), 510px) !important;
    min-height: 73px; margin: 0 !important; padding: 7px !important; gap: 7px;
    background: var(--pea-panel-raised, #fff); border: 0; border-radius: 23px;
    box-shadow: 0 10px 30px rgba(21,42,66,.13), 0 1px 4px rgba(21,42,66,.035);
  }
  :root[data-theme='dark'] body.pea-app .pea-flow-page .pea-flow-actions, :root[data-theme='dark'] body.pea-app > .pea-flow-actions { box-shadow: 0 14px 36px rgba(0,0,0,.36); }
  body.pea-app .pea-flow-actions .pea-flow-action { flex: 0 0 auto; min-height: 58px; padding: 10px 14px; font-size: 12.3px; }
  body.pea-app .pea-flow-actions .pea-flow-action--primary { flex: 1 1 auto; min-width: 0; margin-inline-start: 0; }
}
@media (max-width: 700px) {
  .pea-flow-page { padding-block-start: 3px; }
  .pea-flow-fields { grid-template-columns: minmax(0,1fr); gap: 17px; }
  .pea-flow-field--wide, .pea-flow-date, .pea-flow-file, .pea-flow-choice-grid { grid-column: auto; }
  body.pea-app .pea-flow-page .pea-flow-field :is(input:not([type='radio']):not([type='file']),textarea,select) { min-height: 50px; font-size: 16px; }
  .pea-flow-field > span:first-child { font-size: 12.3px; }
  .pea-flow-choice { min-height: 57px; }
  .pea-flow-upload { min-height: 98px; padding: 14px; }
}
@media (max-width: 375px) {
  body.pea-app .pea-flow-page .pea-flow-actions, body.pea-app > .pea-flow-actions { width: calc(100% - 16px) !important; border-radius: 20px; padding: 5px !important; gap: 4px; }
  body.pea-app .pea-flow-actions .pea-flow-action { padding-inline: 10px; font-size: 11.7px; }
  .pea-flow-choice-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pea-flow-page *, .pea-flow-page *::before, .pea-flow-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
