/* The Avorinth — consolidated pre-Stripe polish (2026-10-16)
   Intentionally separate from assets/css/app.css. */

/* Owner/admin navigation shortcut */
.nav-actions .admin-link{white-space:nowrap}
.workspace-hero-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.workspace-control-room{white-space:nowrap}

/* Pricing: make the user's live plan unmistakable. */
.pricing-current-badge{display:inline-flex;align-items:center;min-height:24px;margin-left:10px;padding:5px 9px;border:1px solid #bfd1ff;border-radius:999px;background:#f2f6ff;color:#3253c8;font-size:10px;font-weight:800;letter-spacing:.07em;vertical-align:middle}
.pricing-current-button[disabled]{cursor:default;opacity:1;background:#f4f7ff!important;border-color:#cbd7fb!important;color:#435779!important;box-shadow:none!important}

/* Report warnings: icon is a fixed column instead of floating on its own line. */
.change-withheld-note,.change-confidence-note{display:grid!important;grid-template-columns:32px minmax(0,1fr);align-items:start;gap:12px}
.change-withheld-note>span,.change-confidence-note>span{display:flex!important;align-items:center;justify-content:center;width:30px;height:30px;margin:0!important;border-radius:10px;line-height:1;font-weight:900;flex:0 0 30px}
.change-withheld-note>p,.change-confidence-note>p{margin:0!important;min-width:0}
.competitor-plan-report-lock{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap}
.competitor-plan-report-lock .button{margin-left:auto;white-space:nowrap}

/* Friendly retained-over-limit usage presentation. */
.usage-over-limit-note{margin-top:6px;color:#71819a;font-size:12px;line-height:1.5}

/* 404 / protected-not-found page. No unconstrained brand image. */
.av-error-page{padding:72px 20px 92px;background:linear-gradient(180deg,#fff,#f8faff)}
.av-error-shell{width:min(760px,100%);margin:0 auto;text-align:center}
.av-error-mark{display:flex;align-items:center;justify-content:center;width:74px;height:74px;margin:0 auto 22px;border:1px solid #dce5ff;border-radius:22px;background:linear-gradient(145deg,#edf2ff,#f7f4ff);color:#5064f5;font-size:30px;font-weight:900;box-shadow:0 18px 42px rgba(64,88,180,.12)}
.av-error-code{margin-bottom:10px;color:#6276dc;font-size:12px;font-weight:900;letter-spacing:.28em}
.av-error-page h1{margin:0;color:#0d2448;font-size:clamp(34px,5vw,54px);letter-spacing:-.035em}
.av-error-page p{max-width:570px;margin:14px auto 26px;color:#60708e;font-size:16px;line-height:1.65}
.av-error-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}

@media(max-width:760px){
  .workspace-hero-actions{justify-content:flex-start}
  .pricing-current-badge{margin:7px 0 0;display:flex;width:max-content}
  .competitor-plan-report-lock .button{margin-left:0}
}

/* =========================================================
   Report header + Change Intelligence responsive refinement
   Hotfix 3 — 2026-10-16
   ========================================================= */

/* Keep the desktop metadata line visually identical, but build each item
   separately so a conditional item can never leave a trailing bullet. */
.report-scan-meta{
  display:flex!important;
  align-items:center;
  flex-wrap:wrap;
  gap:4px 0!important;
  min-width:0;
}
.report-scan-meta>span{
  display:inline-flex!important;
  align-items:center;
  min-width:0;
  white-space:normal;
}
.report-scan-meta>span+span::before{
  content:"•";
  display:inline-block;
  margin:0 9px;
  color:inherit;
  opacity:.72;
}

/* Warning rows: restore the compact visual weight while keeping a robust
   two-column layout. The 30px icon and 10px desktop margin match the
   approved manual adjustment. */
.change-withheld-note,
.change-confidence-note{
  display:grid!important;
  grid-template-columns:50px minmax(0,1fr)!important;
  align-items:start!important;
  gap:0!important;
  min-width:0;
}
.change-withheld-note>span,
.change-confidence-note>span{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:30px!important;
  height:30px!important;
  margin:10px!important;
  border-radius:10px!important;
  line-height:1!important;
  font-weight:900!important;
  flex:0 0 30px!important;
  box-sizing:border-box;
}
.change-withheld-note>p,
.change-confidence-note>p{
  min-width:0;
  margin:10px 12px 10px 0!important;
  font-size:13px!important;
  line-height:1.52!important;
  overflow-wrap:anywhere;
}
.change-withheld-note>p strong,
.change-confidence-note>p strong{
  font-size:inherit;
}
.change-disclaimer{
  font-size:10.3px!important;
  line-height:1.55!important;
}

@media(max-width:650px){
  /* On phones, stack the scan metadata cleanly. No bullet can wrap onto a
     new line by itself, and the report title area stays compact. */
  .report-scan-meta{
    display:grid!important;
    grid-template-columns:1fr;
    gap:3px!important;
    margin-top:5px;
  }
  .report-scan-meta>span{
    display:block!important;
    width:100%;
    line-height:1.45;
  }
  .report-scan-meta>span+span::before{
    content:none!important;
    display:none!important;
  }

  /* Compact warning rows on mobile while preserving the left-hand icon. */
  .change-withheld-note,
  .change-confidence-note{
    grid-template-columns:38px minmax(0,1fr)!important;
    align-items:start!important;
  }
  .change-withheld-note>span,
  .change-confidence-note>span{
    width:30px!important;
    height:30px!important;
    margin:4px!important;
  }
  .change-withheld-note>p,
  .change-confidence-note>p{
    margin:4px 0!important;
    font-size:12.5px!important;
    line-height:1.5!important;
  }
  .change-disclaimer{
    margin-top:10px!important;
    font-size:10.3px!important;
    line-height:1.5!important;
  }
}

/* =========================================================
   Change Intelligence mobile layout repair
   Hotfix 4 — 2026-10-16
   Desktop is intentionally unchanged. On phones/tablets the
   comparison metrics become a 2x2 grid and detail panels stack.
   ========================================================= */
@media(max-width:760px){
  .change-intelligence-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  .change-intelligence-card *,
  .change-intelligence-card *::before,
  .change-intelligence-card *::after{
    box-sizing:border-box;
  }

  .change-intelligence-head{
    min-width:0!important;
  }

  .change-score-strip,
  .change-metric-grid,
  .change-columns,
  .change-evidence-grid{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  /* Four summary metrics: readable 2 x 2 arrangement instead of
     squeezing all four desktop cards into one narrow row. */
  .change-metric-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }
  .change-metric{
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    padding:13px 11px!important;
    gap:9px!important;
    overflow:hidden!important;
  }
  .change-metric>div{
    min-width:0!important;
  }
  .change-metric small,
  .change-metric strong,
  .change-metric p{
    max-width:100%!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
  }
  .change-metric p{
    line-height:1.4!important;
  }

  /* Resolved / New / Still open panels must stack. Three desktop
     columns were the main source of the unusable narrow text. */
  .change-columns{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
  }
  .change-list-panel{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  .change-list-title,
  .change-item,
  .change-empty{
    min-width:0!important;
  }
  .change-list-title>div,
  .change-item>div,
  .change-empty>p{
    min-width:0!important;
    overflow-wrap:anywhere!important;
  }

  /* Site / competitor movement cards also stack on mobile. */
  .change-evidence-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
  }
  .change-evidence-panel{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  /* Keep score comparison contained in the card. */
  .change-score-strip{
    overflow:hidden!important;
  }
  .change-score-flow{
    min-width:0!important;
    max-width:100%!important;
  }

  /* Never let a long finding title create horizontal page scrolling. */
  .change-intelligence-card h2,
  .change-intelligence-card h3,
  .change-intelligence-card p,
  .change-intelligence-card strong,
  .change-intelligence-card small{
    overflow-wrap:anywhere;
  }
}

@media(max-width:430px){
  .change-intelligence-card{
    padding-left:14px!important;
    padding-right:14px!important;
  }
  .change-metric-grid{
    gap:8px!important;
  }
  .change-metric{
    padding:12px 9px!important;
  }
  .change-metric-icon{
    flex:0 0 32px!important;
    width:32px!important;
    height:32px!important;
  }
}
