/* Orlando Painting & Power Washing — shared website color contract. */
@font-face {
  font-family: 'Montserrat';
  src: url('../08_source/fonts/Montserrat-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --brand-navy: #0B1930;
  --brand-pink: #F5277B;
  --action-pink: #D6115E;
  --action-hover: #B70E50;
  --brand-white: #FFFFFF;
  --brand-orange: #FFA343;
  --brand-leaf: #3B8750;
  --surface-soft: #F5F7FA;
  --text-body: #243449;
  --text-muted: #546277;
  --border-subtle: #D9E2EE;
  --field-border: #7B899E;
  --oppw-focus-ring: 0 0 0 3px var(--brand-white), 0 0 0 6px var(--action-pink);
  --oppw-radius: 14px;
  --oppw-nudge-bottom: 24px;
  --oppw-nudge-right: 12px;
  --oppw-nudge-layer: 40;
  --oppw-header-offset: 96px;
  --oppw-mascot-fine-y: 0px;
  --oppw-font: 'Montserrat', Arial, Helvetica, sans-serif;
}

/* Scoped components; these rules do not restyle unrelated live form fields. */
.oppw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--action-pink);
  color: var(--brand-white);
  font: 700 0.95rem/1.2 var(--oppw-font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.oppw-button:hover { background: var(--action-hover); }
.oppw-button:focus-visible,
.oppw-estimate-nudge a:focus-visible,
.oppw-estimate-nudge button:focus-visible {
  outline: 0;
  box-shadow: var(--oppw-focus-ring);
}
.oppw-estimate-target { scroll-margin-top: var(--oppw-header-offset); }
.oppw-estimate-target:focus { outline: none; }
.oppw-estimate-target:focus-visible { outline: 3px solid var(--action-pink); outline-offset: 8px; }

/* Put the real form inside column one. The mascot lives on its RIGHT,
   points LEFT toward the form button, and never covers inputs or labels. */
.oppw-estimate-layout {
  --oppw-mascot-shift: 0px;
  --oppw-mascot-reserve: 0px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(120px, 12vw, 180px);
  align-items: end;
  gap: 16px;
  min-width: 0;
  padding-bottom: var(--oppw-mascot-reserve);
}
.oppw-estimate-layout__form { min-width: 0; }
.oppw-form-mascot {
  align-self: end;
  margin: 0;
  transform: translateY(var(--oppw-mascot-shift));
  pointer-events: none;
  user-select: none;
}
.oppw-form-mascot img { display: block; width: 100%; height: auto; }

/* Scroll prompt: normal semantic HTML. Text stays editable and accessible. */
.oppw-estimate-nudge[hidden] { display: none !important; }
.oppw-estimate-nudge {
  position: fixed;
  z-index: var(--oppw-nudge-layer);
  right: var(--oppw-nudge-right);
  bottom: var(--oppw-nudge-bottom);
  width: 172px;
  display: grid;
  grid-template-columns: 116px 48px;
  grid-template-rows: 140px auto;
  align-items: end;
  gap: 8px;
  box-sizing: border-box;
  color: var(--brand-navy);
  font: 600 13px/1.35 var(--oppw-font);
}
.oppw-estimate-nudge__mascot {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: 116px;
  height: 140px;
  object-fit: contain;
  object-position: bottom;
  pointer-events: none;
}
.oppw-estimate-nudge__text {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--brand-white);
  box-shadow: 0 5px 18px rgb(11 25 48 / 9%);
  text-align: center;
}
.oppw-estimate-nudge__link {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  border-radius: 9px;
  background: var(--action-pink);
  color: var(--brand-white);
  font-size: 16px;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-decoration: none;
  text-align: center;
}
.oppw-estimate-nudge__link:hover { background: var(--action-hover); }
.oppw-estimate-nudge__close {
  position: absolute;
  top: -38px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: var(--brand-white);
  color: var(--brand-navy);
  font: 700 26px/1 var(--oppw-font);
  cursor: pointer;
}
.oppw-estimate-nudge-spacer { display: none; }

@media (min-width: 1280px) {
  /* Add to your main content wrapper to reserve space for the side tab. */
  .oppw-reserve-rail { padding-inline-end: 196px !important; }
}
@media (max-width: 1279px) {
  .oppw-estimate-nudge {
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    bottom: calc(var(--oppw-nudge-bottom) + env(safe-area-inset-bottom));
    width: auto;
    max-width: 460px;
    margin-inline: auto;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 9px;
    padding: 10px 42px 10px 9px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: var(--brand-white);
    box-shadow: 0 8px 32px rgb(11 25 48 / 16%);
  }
  .oppw-estimate-nudge__mascot { grid-column: 1; grid-row: 1; width: 54px; height: 68px; }
  .oppw-estimate-nudge__text { grid-column: 2; grid-row: 1; padding: 0; border: 0; box-shadow: none; text-align: left; }
  .oppw-estimate-nudge__link { grid-column: 3; grid-row: 1; min-height: 48px; padding: 8px 10px; writing-mode: horizontal-tb; font-size: 14px; line-height: 1.2; }
  .oppw-estimate-nudge__close { top: 50%; right: 1px; width: 40px; height: 44px; margin-top: -22px; border: 0; background: transparent; }
  .oppw-estimate-nudge-spacer[data-visible="true"] { display: block; height: calc(140px + var(--oppw-nudge-bottom) + env(safe-area-inset-bottom)); }
}
@media (max-width: 699px) {
  .oppw-estimate-layout { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }
  .oppw-form-mascot { display: none; }
  :root { --oppw-nudge-bottom: 10px; }
}
@media (max-width: 359px) {
  .oppw-estimate-nudge { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 6px; }
  .oppw-estimate-nudge__mascot { width: 38px; }
  .oppw-estimate-nudge__text { font-size: 11px; }
  .oppw-estimate-nudge__link { font-size: 12px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .oppw-estimate-nudge { animation: oppw-nudge-in 180ms ease-out both; }
  @keyframes oppw-nudge-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
