/* =============================================================
   WIZARD.CSS — PBWizard Styles  v0.8.2 — 2026-03-10 — measurement image max-height increased to 250px
   All wizard CSS lives here. Zero wizard rules in knurledstyles.css
   except ~20 lines for .pb-rec-* badge states added in Phase 5.

   Namespace — every selector is prefixed:
     .pb-wizard-*   full-wizard modal
     .pb-qpick-*    quick pick modal
     .pb-wiz-*      shared inner components (answer cards, nav btns, etc.)
     .pb-wiz-disc-* disclosure / entry point toggle

   Variable mapping (Build 12.8 → AJI palette):
     --primary / --primary-dark    → --aji-midnight-express  (#1F2937)
     --primary-light               → --aji-cool-iron         (#334155)
     --success / --success-light   → --aji-green             (#28A745)
     --gray-100                    → --aji-vapor             (#F1F5F9)
     --gray-200/300                → --aji-galvanized-steel  (#E2E8F0)
     --gray-400                    → --aji-polished-silver   (#94A3B8)
     --text                        → --aji-deep-carbon       (#111827)
     --text-light                  → --aji-brushed-steel     (#64748B)
     --white                       → --aji-pure-white        (#FFFFFF)
     wizard action blue            → --aji-bright-blue       (#016FB9)
   ============================================================= */

/* ----------------------------------------------------------
   1. WIZARD-SCOPED VARIABLES
   Defined here so a future theme change only needs edits in
   this block. All resolve to existing --aji-* tokens.
   ---------------------------------------------------------- */
:root {
  --wiz-header-bg:        var(--aji-midnight-express);
  --wiz-header-text:      var(--aji-pure-white);
  --wiz-action:           var(--aji-bright-blue);
  --wiz-action-hover:     var(--aji-dark-blue);
  --wiz-success:          var(--aji-green);
  --wiz-success-light:    #86efac;   /* no direct AJI token exists */
  --wiz-surface:          var(--aji-pure-white);
  --wiz-bg-subtle:        var(--aji-vapor);
  --wiz-border:           var(--aji-galvanized-steel);
  --wiz-border-mid:       #cbd5e1;
  --wiz-text:             var(--aji-deep-carbon);
  --wiz-text-muted:       var(--aji-brushed-steel);
  --wiz-disabled-bg:      var(--aji-polished-silver);
  --wiz-radius:           8px;
  --wiz-transition:       all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  --wiz-shadow-md:        0 4px 6px rgba(0, 0, 0, 0.12);
  --wiz-shadow-lg:        0 10px 25px rgba(0, 0, 0, 0.18);
}

/* ----------------------------------------------------------
   2. KEYFRAMES
   Namespaced to avoid collisions with knurledstyles.css
   ---------------------------------------------------------- */
@keyframes pb-wiz-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pb-wiz-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ----------------------------------------------------------
   3. DISCLOSURE / ENTRY POINT
   The collapsible panel above the PB model grid that houses
   the "Quick Pick" and "Ideal Match" launch buttons.
   ---------------------------------------------------------- */
.pb-wiz-disc {
  margin: 16px 0 20px;
  border: 1px solid var(--wiz-border);
  border-radius: var(--wiz-radius);
  overflow: hidden;
}

.pb-wiz-disc-toggle {
  width: 100%;
  padding: 14px 20px;
  background-color: var(--wiz-action);
  border: none;
  text-align: center;
  cursor: pointer;
  transition: var(--wiz-transition);
  color: var(--wiz-header-text);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--wiz-radius);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.pb-wiz-disc-toggle:hover {
  background-color: var(--wiz-action-hover);
  transform: translateY(-2px);
  box-shadow: var(--wiz-shadow-md);
}

.pb-wiz-disc-toggle:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.pb-wiz-disc-toggle:disabled:hover {
  background-color: var(--wiz-action);
  transform: none;
  box-shadow: none;
}

.pb-wiz-disc.active .pb-wiz-disc-toggle {
  background-color: var(--aji-alert-red);
  color: #ffffff;
  border-radius: var(--wiz-radius) var(--wiz-radius) 0 0;
  transform: none;
}

.pb-wiz-disc.active .pb-wiz-disc-toggle:hover {
  background-color: #c0392b;
  color: #ffffff;
  transform: none;
  box-shadow: none;
}

/* Re-apply recommendation banner */
.pb-rec-banner {
  background: #eff6ff;
  border: 1px solid var(--aji-bright-blue);
  border-radius: 8px;
  padding: 13px 15px;
  margin-top: 12px;
  font-size: .9rem;
}
.pb-rec-banner-inner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 10px;
}
.pb-rec-banner-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  fill: var(--aji-bright-blue);
}
.pb-rec-banner-txt {
  margin: 0;
  color: var(--aji-deep-carbon);
  font-weight: 500;
  line-height: 1.4;
}
.pb-rec-banner-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-left: 25px;
}
.pb-rec-banner-yes {
  background: var(--aji-bright-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.pb-rec-banner-yes:hover { background: var(--aji-dark-blue); }
.pb-rec-banner-no {
  background: transparent;
  color: var(--aji-slate-steel);
  border: 1px solid var(--aji-galvanized-steel);
  border-radius: 6px;
  padding: 7px 16px;
  font-size: .88rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, color .2s;
}
.pb-rec-banner-no:hover { background: #f1f5f9; color: var(--aji-deep-carbon); }

.pb-wiz-disc-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.pb-wiz-disc.active .pb-wiz-disc-chevron {
  transform: rotate(180deg);
}

.pb-wiz-disc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: var(--wiz-bg-subtle);
}

.pb-wiz-disc.active .pb-wiz-disc-panel {
  max-height: 300px;
}

.pb-wiz-disc-inner {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pb-wiz-disc-btn {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
  border: 2px solid var(--wiz-border);
  border-radius: var(--wiz-radius);
  background-color: var(--wiz-surface);
  color: var(--wiz-text);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--wiz-transition);
  text-align: center;
}

.pb-wiz-disc-btn:hover {
  border-color: var(--wiz-action);
  color: var(--wiz-action);
  transform: translateY(-2px);
  box-shadow: var(--wiz-shadow-md);
}

.pb-wiz-disc-btn-label,
.pb-wiz-disc-btn-sub {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--wiz-text-muted);
  margin-top: 3px;
}

/* ----------------------------------------------------------
   4. SHARED OVERLAY SHELL
   Both modals use these base rules.
   ---------------------------------------------------------- */
.pb-wizard-overlay,
.pb-qpick-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pb-wizard-overlay.active,
.pb-qpick-overlay.active {
  opacity: 1;
  visibility: visible;
  animation: pb-wiz-overlay-in 0.25s ease;
}

/* ----------------------------------------------------------
   5. QUICK PICK MODAL
   ---------------------------------------------------------- */
.pb-qpick-modal {
  background-color: var(--wiz-surface);
  border-radius: var(--wiz-radius);
  box-shadow: var(--wiz-shadow-lg);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.pb-qpick-overlay.active .pb-qpick-modal {
  transform: translateY(0);
}

.pb-qpick-header {
  background-color: var(--wiz-header-bg);
  color: var(--wiz-header-text);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--wiz-radius) var(--wiz-radius) 0 0;
}

/* Brand label in header */
.pb-qpick-brand,
.pb-qpick-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pb-qpick-subtitle {
  font-size: 0.88rem;
  opacity: 0.85;
  margin-top: 2px;
}

/* Progress bar — bg matches the header so the filled portion reads
   as the bottom edge of the dark header rather than a floating strip */
.pb-qpick-progress {
  height: 4px;
  background: var(--wiz-header-bg);
  overflow: hidden;
}

.pb-qpick-progress-bar {
  height: 100%;
  background: var(--wiz-header-text);
  transition: width 0.3s ease;
  width: 0%;
}

/* Body / content wrapper */
.pb-qpick-body,
.pb-qpick-content {
  padding: 20px;
}

/* Question containers — only the active one is shown */
.pb-qpick-q {
  display: none;
}

.pb-qpick-q.active {
  display: block;
  animation: pb-wiz-fade-in 0.3s ease;
}

/* Question text */
.pb-qpick-question {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--wiz-text);
}

/* Options stack */
.pb-qpick-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Individual option button */
.pb-qpick-opt {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--wiz-border);
  border-radius: var(--wiz-radius);
  background: var(--wiz-surface);
  color: var(--wiz-text);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: var(--wiz-transition);
  position: relative;
}

.pb-qpick-opt:hover {
  border-color: var(--wiz-action);
  color: var(--wiz-action);
  background: rgba(1, 111, 185, 0.04);
}

.pb-qpick-opt.selected {
  border-color: var(--wiz-success);
  background: rgba(40, 167, 69, 0.06);
  color: var(--wiz-text);
}

.pb-qpick-opt.selected::after {
  content: "\2713";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background-color: var(--wiz-success);
  color: var(--wiz-header-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  line-height: 22px;
  text-align: center;
}

/* Quick Pick nav buttons */
.pb-qpick-nav-btn {
  padding: 10px 20px;
  border-radius: var(--wiz-radius);
  font-weight: 600;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--wiz-transition);
  background-color: transparent;
  color: var(--wiz-text-muted);
  border: 1px solid var(--wiz-border);
}

.pb-qpick-nav-btn:hover:not(:disabled) {
  background-color: var(--wiz-bg-subtle);
  border-color: var(--wiz-text-muted);
  color: var(--wiz-text);
}

.pb-qpick-back {
  background-color: var(--wiz-bg-subtle);
  color: var(--wiz-text);
  border: 1px solid var(--wiz-border);
}

.pb-qpick-back:hover:not(:disabled) {
  background-color: var(--wiz-border);
  color: var(--wiz-text);
}

.pb-qpick-next {
  background-color: var(--wiz-action);
  color: #ffffff;
  border-color: var(--wiz-action);
}

.pb-qpick-next:hover:not(:disabled) {
  background-color: var(--wiz-action-hover);
  color: #ffffff;
  border-color: var(--wiz-action-hover);
}

.pb-qpick-back:disabled,
.pb-qpick-next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.pb-qpick-results {
  display: none;
}

.pb-qpick-results.active {
  display: block;
  animation: pb-wiz-fade-in 0.3s ease;
}

.pb-qpick-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--wiz-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* ----------------------------------------------------------
   6. FULL WIZARD MODAL
   ---------------------------------------------------------- */
.pb-wizard-modal {
  background-color: var(--wiz-surface);
  border-radius: var(--wiz-radius);
  box-shadow: var(--wiz-shadow-lg);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.pb-wizard-overlay.active .pb-wizard-modal {
  transform: translateY(0);
}

.pb-wizard-header {
  background-color: var(--wiz-header-bg);
  color: var(--wiz-header-text);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
  border-radius: var(--wiz-radius) var(--wiz-radius) 0 0;
}

.pb-wizard-header-text {
  flex: 1;
}

.pb-wizard-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.pb-wizard-subtitle {
  font-size: 0.88rem;
  opacity: 0.85;
  margin-top: 3px;
}

/* Progress bar lives inside the header */
.pb-wizard-progress {
  height: 4px;
  background-color: rgba(255, 255, 255, 0.25);
  margin-top: 10px;
  border-radius: 2px;
  overflow: hidden;
}

.pb-wizard-progress-bar {
  height: 100%;
  background-color: var(--wiz-header-text);
  width: 0%;
  transition: width 0.35s ease;
}

/* Close button — shared by both modals */
.pb-wiz-close,
.pb-qpick-close {
  width: 36px;
  height: 36px;
  border: 2px solid var(--wiz-header-text);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--wiz-header-text);
  cursor: pointer;
  transition: var(--wiz-transition);
  flex-shrink: 0;
  padding: 0;
  font-family: inherit;
}

.pb-wiz-close:hover,
.pb-qpick-close:hover {
  background: var(--aji-alert-red);
  border-color: var(--aji-alert-red);
  transform: scale(1.1);
}

/* ----------------------------------------------------------
   7. WIZARD CONTENT AREA
   ---------------------------------------------------------- */
.pb-wizard-content {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
}

.pb-wizard-question {
  display: none;
}

.pb-wizard-question.active {
  display: block;
  animation: pb-wiz-fade-in 0.4s ease;
}

.pb-wiz-q-number {
  color: var(--wiz-action);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pb-wiz-q-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--wiz-text);
  margin-bottom: 14px;
}

/* ----------------------------------------------------------
   8. ANSWER GRID + ANSWER CARDS
   ---------------------------------------------------------- */
.pb-wiz-answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

/* Answer card — also used for the Skip button on Q13/Q14 */
.pb-wiz-answer-card {
  border: 2px solid var(--wiz-border);
  border-radius: var(--wiz-radius);
  padding: 12px;
  cursor: pointer;
  transition: var(--wiz-transition);
  text-align: center;
  position: relative;
  background-color: var(--wiz-surface);
  /* buttons need these resets */
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: var(--wiz-text);
  width: 100%;
}

.pb-wiz-answer-card:hover {
  border-color: var(--wiz-action);
  transform: translateY(-2px);
  box-shadow: var(--wiz-shadow-md);
}

.pb-wiz-answer-card.selected {
  border-color: var(--wiz-success);
  background-color: rgba(40, 167, 69, 0.06);
}

.pb-wiz-answer-card.selected::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background-color: var(--wiz-success);
  color: var(--wiz-header-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
}

.pb-wiz-answer-title {
  font-weight: 600;
  margin-bottom: 3px;
}

.pb-wiz-answer-desc {
  font-size: 0.88rem;
  color: var(--wiz-text-muted);
}

/* .pb-wiz-skip inherits all styles from .pb-wiz-answer-card with no overrides.
   It sits in the normal grid flow like any other option card. */

/* ----------------------------------------------------------
   9. UPPER NAVIGATION ROW (above answer cards)
   Synced in lockstep with the lower navigation.
   ---------------------------------------------------------- */
.pb-wiz-upper-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

/* ----------------------------------------------------------
  10. TIP / NOTE CALLOUT
   ---------------------------------------------------------- */
.pb-wiz-measurement {
  text-align: center;
  margin: 14px 0;
}

.pb-wiz-measurement img {
  max-width: 100%;
  height: auto;
  max-height: 250px;
  border-radius: var(--wiz-radius);
}

.pb-wiz-tip {
  background-color: var(--wiz-bg-subtle);
  border-radius: var(--wiz-radius);
  padding: 12px 14px;
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pb-wiz-tip-icon {
  color: var(--wiz-action);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.pb-wiz-tip-text {
  font-size: 0.88rem;
  color: var(--wiz-text-muted);
  line-height: 1.5;
}

/* ----------------------------------------------------------
  11. LOWER NAVIGATION (fixed footer bar)
   ---------------------------------------------------------- */
.pb-wizard-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--wiz-border);
  flex-shrink: 0;
}

.pb-qpick-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--wiz-border);
}

/* ----------------------------------------------------------
  12. NAVIGATION BUTTONS
   Shared by upper and lower nav in both modals.
   ---------------------------------------------------------- */
.pb-wiz-btn {
  padding: 10px 20px;
  border-radius: var(--wiz-radius);
  font-weight: 600;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--wiz-transition);
  border: none;
}

.pb-wiz-btn-back {
  background-color: transparent;
  color: var(--wiz-text-muted);
  border: 1px solid var(--wiz-border);
}

.pb-wiz-btn-back:hover {
  background-color: var(--wiz-bg-subtle);
  border-color: var(--wiz-text-muted);
  color: var(--wiz-text);
}

.pb-wiz-btn-next {
  background-color: var(--wiz-action);
  color: var(--wiz-header-text);
}

.pb-wiz-btn-next:hover {
  background-color: var(--wiz-action-hover);
}

.pb-wiz-btn-next:disabled {
  background-color: var(--wiz-disabled-bg);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ----------------------------------------------------------
  13. WIZARD RESULTS
   ---------------------------------------------------------- */
.pb-wizard-results {
  padding: 20px;
  display: none;
  overflow-y: auto;
  flex-grow: 1;
}

.pb-wizard-results.active {
  display: block;
  animation: pb-wiz-fade-in 0.4s ease;
}

.pb-wiz-results-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--aji-deep-carbon);
  margin-bottom: 8px;
  text-align: center;
}

.pb-wiz-results-subtitle {
  text-align: center;
  color: var(--wiz-text-muted);
  font-size: 0.93rem;
  margin-bottom: 20px;
}

.pb-wiz-result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.pb-wiz-result-card {
  border: 2px solid var(--wiz-border);
  border-radius: var(--wiz-radius);
  overflow: hidden;
  transition: var(--wiz-transition);
  position: relative;
}

.pb-wiz-result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--wiz-shadow-md);
}

.pb-wiz-result-card.best-match {
  border-color: var(--wiz-success);
}

.pb-wiz-result-card.alternative,
.pb-wiz-result-card.for-sharing {
  border-color: var(--wiz-action);
}

.pb-wiz-result-badge {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 5px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--wiz-header-text);
}

.pb-wiz-result-card.best-match .pb-wiz-result-badge {
  background-color: var(--wiz-success);
}

.pb-wiz-result-card.alternative .pb-wiz-result-badge,
.pb-wiz-result-card.for-sharing .pb-wiz-result-badge {
  background-color: var(--wiz-action);
}

.pb-wiz-result-header {
  padding: 44px 15px 15px; /* increased top padding to clear the result badge */
  background-color: var(--wiz-bg-subtle);
  text-align: center;
}

.pb-wiz-result-card.oos .pb-wiz-result-header {
  background-color: #e9ecef;
}

.pb-wiz-result-card.oos {
  border-color: var(--aji-slate-steel);
}

.pb-wiz-result-card.oos .pb-wiz-result-badge {
  background-color: var(--aji-slate-steel);
}

.pb-wiz-result-thickness {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--aji-deep-carbon);
  margin-bottom: 3px;
}

.pb-wiz-result-knurl {
  font-size: 1.05rem;
  color: var(--aji-deep-carbon);
}

.pb-wiz-result-body {
  padding: 14px;
}

.pb-wiz-result-why {
  font-size: 0.9rem;
  color: var(--wiz-text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

/* "Apply to my grips" button on each result card */
.pb-wiz-apply-btn {
  background-color: var(--wiz-success);
  color: var(--wiz-header-text);
  border: none;
  border-radius: var(--wiz-radius);
  padding: 10px;
  width: 100%;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--wiz-transition);
}

.pb-wiz-apply-btn:hover {
  background-color: #218838;
}

/* Out of stock state on a result card — no opacity change, card stays full visibility */
.pb-wiz-result-card.oos .pb-wiz-apply-btn {
  display: none; /* apply btn is replaced by notify btn when OOS */
}

/* ----------------------------------------------------------
   Standard badge inline positioning override
   Reuses knurledstyles.css badge classes (pb-oos-corner,
   pb-thick-coming-soon-badge, pb-thick-uc-badge) but overrides
   position so they sit inline next to the badge label text.
   ---------------------------------------------------------- */
.pb-wiz-badge-inline {
  position: static;
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}

/* ----------------------------------------------------------
   Price line on result card
   ---------------------------------------------------------- */
.pb-wiz-result-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--aji-deep-carbon);
  margin-bottom: 10px;
}

/* ----------------------------------------------------------
   Divider above pb-notify-widget in OOS result cards.
   Replaces the old pb-wiz-card-notify-divider which was part
   of the hand-rolled inline form (now removed).
   ---------------------------------------------------------- */
.pb-wiz-notify-divider {
  border: none;
  border-top: 1px solid var(--wiz-border);
  margin: 14px 0 12px 0;
}

/* ----------------------------------------------------------
   "Apply This Instead" button on alt card
   ---------------------------------------------------------- */
.pb-wiz-apply-alt {
  background-color: var(--wiz-action);
}

.pb-wiz-apply-alt:hover {
  background-color: var(--wiz-action-hover);
}

.pb-wiz-notify-err {
  font-size: 0.82rem;
  color: #dc3545;
  margin-top: 5px;
  min-height: 1em;
}

.pb-wiz-notify-success {
  display: none;
  align-items: center;
  gap: 8px;
  color: #155724;
  font-size: 0.92rem;
  font-weight: 600;
  margin-top: 6px;
}

.pb-wiz-notify-success.visible {
  display: flex;
}

/* ----------------------------------------------------------
  14. "APPLY YOUR LAST REC" BANNER
   Shown on 2nd+ pair when PB.wizardRec !== null.
   ---------------------------------------------------------- */
.pb-wiz-apply-banner {
  display: none;
  background-color: var(--wiz-bg-subtle);
  border: 1px solid var(--wiz-border);
  border-left: 4px solid var(--wiz-success);
  border-radius: var(--wiz-radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pb-wiz-apply-banner.visible {
  display: flex;
  animation: pb-wiz-fade-in 0.3s ease;
}

.pb-wiz-banner-text {
  font-size: 0.93rem;
  color: var(--wiz-text);
}

.pb-wiz-banner-rec {
  font-weight: 700;
  color: var(--wiz-action);
}

.pb-wiz-banner-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pb-wiz-banner-yes {
  background-color: var(--wiz-success);
  color: var(--wiz-header-text);
  border: none;
  border-radius: var(--wiz-radius);
  padding: 7px 14px;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--wiz-transition);
}

.pb-wiz-banner-yes:hover {
  background-color: #218838;
}

.pb-wiz-banner-no {
  background-color: transparent;
  color: var(--wiz-text-muted);
  border: 1px solid var(--wiz-border);
  border-radius: var(--wiz-radius);
  padding: 7px 14px;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--wiz-transition);
}

.pb-wiz-banner-no:hover {
  color: var(--wiz-text);
  border-color: var(--wiz-border-mid);
}

/* ----------------------------------------------------------
   15. RECOMMENDATION BADGE — thickness & knurl cards
   (border + tint overlay + bottom bar; coexists with OOS &
   Fac-Sec badges which sit top-left / center-image)
   ---------------------------------------------------------- */
.pb-thick-card.pb-wiz-rec,
.pb-knurl-card.pb-wiz-rec {
  border: 2px solid var(--aji-green);
  box-shadow: 0 0 0 1px var(--aji-green), var(--wiz-shadow-md);
}

.pb-wiz-rec-tint {
  position: absolute;
  inset: 0;
  background: rgba(40, 167, 69, 0.12);
  pointer-events: none;
  z-index: 1;
}

.pb-wiz-rec-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(25, 135, 84, 0.88);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  padding: 4px 6px;
  pointer-events: none;
  z-index: 4;
  line-height: 1;
}

/* ----------------------------------------------------------
  16. RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 540px) {
  .pb-wizard-modal,
  .pb-qpick-modal {
    width: 96%;
    max-height: 94vh;
  }

  .pb-wizard-header,
  .pb-qpick-header {
    padding: 12px 14px;
  }

  .pb-wizard-title,
  .pb-qpick-title {
    font-size: 1.05rem;
  }

  .pb-wizard-content,
  .pb-wizard-results,
  .pb-qpick-content {
    padding: 14px;
  }

  .pb-wiz-answer-grid {
    grid-template-columns: 1fr;
  }

  .pb-wiz-result-cards {
    grid-template-columns: 1fr;
  }

  .pb-wizard-nav,
  .pb-qpick-footer {
    padding: 12px 14px;
  }

  .pb-wiz-btn {
    padding: 9px 14px;
    font-size: 0.9rem;
  }

  .pb-wiz-disc-inner {
    flex-direction: column;
  }

  .pb-wiz-apply-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .pb-wizard-title,
  .pb-qpick-title {
    font-size: 0.95rem;
  }

  .pb-wiz-q-text {
    font-size: 1rem;
  }
}

/* ============================================================
   GRIP WIZARD FIELDSET WRAPPER
   Wraps the pb-wiz-disc in a fieldset matching the order form
   aesthetic. Disabled when no model is selected (managed by
   pbUpdateWizardDisc() in knurledscripts.js).
   ============================================================ */
.pb-wiz-fieldset {
  position: relative;
  border: 1px solid var(--aji-galvanized-steel);
  border-radius: 8px;
  border-top-right-radius: 20px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--aji-pure-white);
}

.pb-wiz-fieldset legend {
  padding: 0 0.5rem;
  font-weight: 700;
  color: var(--aji-deep-carbon);
  font-size: 1.1rem;
}

/* When disabled, dim the whole thing */
.pb-wiz-fieldset:disabled,
.pb-wiz-fieldset[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.pb-wiz-fieldset:disabled *,
.pb-wiz-fieldset[disabled] * {
  pointer-events: none;
}

/* Reset the inner pb-wiz-disc since it's now inside a fieldset
   — remove its own border, radius, and margin */
.pb-wiz-fieldset .pb-wiz-disc {
  margin: 0.75rem 0 0;
  border: none;
  border-radius: 0;
  overflow: visible;
}

/* The toggle button fills the fieldset width as before */
.pb-wiz-fieldset .pb-wiz-disc-toggle {
  border-radius: var(--wiz-radius);
}

.pb-wiz-fieldset .pb-wiz-disc.active .pb-wiz-disc-toggle {
  border-radius: var(--wiz-radius) var(--wiz-radius) 0 0;
}

.pb-wiz-fieldset .pb-wiz-disc-panel {
  border-radius: 0 0 var(--wiz-radius) var(--wiz-radius);
  overflow: hidden;
}
/* END GRIP WIZARD FIELDSET WRAPPER */
