/* =============================================================
   FAIR BUSINESS — SUBMISSION MODAL
   Wizard-style stepped modal for review + complaint submission.
   Activated via fbSubmissionModal.open({mode, product, company})
   or [data-submission-open] click triggers.
   ============================================================= */

/* ============== BACKDROP ============== */
.sub-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s var(--ease), visibility 0s linear .25s;
}
.sub-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

body.has-sub-modal { overflow: hidden; }

/* ============== MODAL SHELL ============== */
.sub-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px -20px rgba(15,23,42,.45), 0 0 0 1px rgba(15,23,42,.05);
  width: 100%;
  max-width: 760px;
  height: 600px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(.97);
  transition: transform .25s var(--ease);
  position: relative;
}
.sub-modal-backdrop.is-open .sub-modal {
  transform: translateY(0) scale(1);
}

/* ============== HEADER ============== */
.sub-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--slate-200);
  background: var(--white);
  flex-shrink: 0;
}
.sub-modal-head .logo img { height: 28px; width: auto; }

/* v1.2.108: .sub-modal-step-counter is no longer rendered (the 01-06 step nav
   below the header already shows progress). Keeping the selector with a
   display:none so any old cached markup doesn't suddenly reappear unstyled. */
.sub-modal-step-counter { display: none; }

/* Logged-in user badge in modal chrome — confirms which account is filing. */
.sub-modal-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  margin-left: auto;
}
.sub-modal-me-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 700;
  flex-shrink: 0;
}
.sub-modal-me-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sub-modal-me-name {
  font-size: var(--fs-base); font-weight: 600;
  color: var(--slate-900);
  max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 600px) {
  .sub-modal-me-name { display: none; }
}

/* v1.2.105 (C6) → v1.2.108: persistent company/product context in the modal
   header. Was a chunky pill; now plain inline text ("Company: X · Product: Y")
   so it reads like a caption instead of a chip. Uses the freed-up space
   from the removed "Step N of M" counter. The selector kept its old id-based
   name (#subContextPill) but the class on the rendered <div> is now
   `.sub-context-info` — class name reflects the new visual treatment. */
.sub-context-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: 14px;
  margin-right: auto;
  font-size: 13px;
  color: var(--slate-600, #475569);
  line-height: 1.35;
  overflow: hidden;
  min-width: 0;
}
.sub-context-info[hidden] { display: none; }
.sub-context-info .sub-ctx-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}
.sub-context-info .sub-ctx-label {
  color: var(--slate-500, #64748b);
  font-weight: 500;
  flex-shrink: 0;
}
.sub-context-info b {
  font-weight: 600;
  color: var(--slate-900, #0f172a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.sub-context-info .sub-ctx-sep {
  color: var(--slate-300, #cbd5e1);
  flex-shrink: 0;
}
@media (max-width: 700px) {
  /* Stack the two items vertically on narrow widths so the truncation budget
     for each name doesn't fight the other. Hide the · separator since the
     line break does that job. */
  .sub-context-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-left: 10px;
    font-size: 12px;
  }
  .sub-context-info .sub-ctx-sep { display: none; }
  .sub-context-info b { max-width: calc(100vw - 180px); }
}
@media (max-width: 400px) {
  /* On very narrow viewports, drop the labels (just bold name) so it fits. */
  .sub-context-info .sub-ctx-label { display: none; }
}

.sub-modal-close {
  width: 36px; height: 36px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--slate-500);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.sub-modal-close:hover { background: var(--slate-100); color: var(--slate-900); }
.sub-modal-close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ============== PROGRESS BAR (wizard pattern) ============== */
.sub-modal-progress-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  padding: 14px 24px 0;
  flex-shrink: 0;
}
.sub-modal-progress {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 0 0 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sub-modal-progress::-webkit-scrollbar { display: none; }
.sub-modal-progress-step {
  position: relative;
  background: none;
  border: none;
  padding: 4px 2px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: inherit;
  cursor: default;
  white-space: nowrap;
  flex-shrink: 0;
}
.sub-modal-progress-num {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 1.5px;
  font-variant-numeric: tabular-nums;
  color: var(--slate-300);
  transition: color .25s var(--ease);
}
.sub-modal-progress-label {
  font-size: var(--fs-base);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--slate-400);
  transition: color .25s var(--ease), font-weight .25s var(--ease);
}
.sub-modal-progress-step.is-done .sub-modal-progress-num { color: var(--green); }
.sub-modal-progress-step.is-done .sub-modal-progress-label { color: var(--slate-500); }
.sub-modal-progress-step.is-active .sub-modal-progress-num { color: var(--green); }
.sub-modal-progress-step.is-active .sub-modal-progress-label { color: var(--slate-900); font-weight: 600; }
.sub-modal-progress-step.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -15px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
}

/* Skipped steps stay greyed but transparent */
.sub-modal-progress-step.is-skipped { display: none; }

/* ============== BODY ============== */
.sub-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px 36px;
}

.sub-modal-step {
  display: none;
  animation: subStepIn .35s var(--ease);
}
.sub-modal-step.is-active { display: block; }

@keyframes subStepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.sub-step-eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-50);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.sub-step-title {
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
/* v1.2.58: required-field marker. Used as <span class="req">*</span>
   inside form labels so users see at a glance which fields they must fill. */
.req {
  color: var(--red-500);
  font-weight: 700;
  margin-left: 2px;
}
.sub-step-subtitle {
  font-size: var(--fs-lg);
  color: var(--slate-500);
  line-height: 1.55;
  margin-bottom: 24px;
}

/* ============== CHOICE CARDS ============== */
.sub-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) { .sub-choice-grid { grid-template-columns: 1fr; } }
.sub-choice-card {
  position: relative;
  padding: 22px;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-lg);
  background: white;
  cursor: pointer;
  transition: all .2s var(--ease);
  text-align: left;
  font-family: inherit;
}
.sub-choice-card:hover {
  border-color: var(--green-light);
  background: var(--green-50);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(56,173,78,.18);
}
.sub-choice-card.is-selected {
  border-color: var(--green);
  background: var(--green-50);
  box-shadow: 0 0 0 4px rgba(56,173,78,.12);
}
.sub-choice-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--green-100);
  color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  transition: all .2s var(--ease);
}
.sub-choice-card.is-selected .sub-choice-card-icon { background: var(--green); color: white; }
.sub-choice-card-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sub-choice-card-title { font-size: var(--fs-xl); font-weight: 700; color: var(--slate-900); margin-bottom: 4px; }
.sub-choice-card-desc { font-size: var(--fs-base); color: var(--slate-500); line-height: 1.5; }
.sub-choice-radio {
  position: absolute; top: 18px; right: 18px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--slate-300);
  background: white;
  transition: all .2s var(--ease);
}
.sub-choice-card.is-selected .sub-choice-radio {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 3px white;
}

/* ============== WIZARD-STYLE PICKER (combobox) ============== */
.sub-picker {
  position: relative;
  margin-bottom: 16px;
}
.sub-picker-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--slate-500);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.sub-picker-trigger {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: var(--fs-lg);
  font-family: inherit;
  color: var(--slate-900);
  background: white;
  outline: none;
  transition: all .2s var(--ease);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.sub-picker-trigger:hover { border-color: var(--slate-300); }
.sub-picker-trigger:focus,
.sub-picker.is-open .sub-picker-trigger {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(56,173,78,.15);
}
.sub-picker-trigger.is-empty .sub-picker-value { color: var(--slate-400); font-weight: 400; }
.sub-picker-trigger.is-disabled {
  background: var(--slate-50);
  color: var(--slate-400);
  cursor: not-allowed;
}
.sub-picker-thumb {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--slate-100);
  overflow: hidden;
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
.sub-picker-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sub-picker-trigger.has-value .sub-picker-thumb { display: inline-flex; }
.sub-picker-value {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.sub-picker-chevron {
  width: 16px; height: 16px;
  stroke: var(--slate-400); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform .2s var(--ease);
}
.sub-picker.is-open .sub-picker-chevron { transform: rotate(180deg); }

/* Floating dropdown (position: fixed so it escapes modal's overflow:hidden) */
.sub-floating-dropdown {
  position: fixed;
  z-index: 1200;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  max-height: 340px;
  overflow: hidden;
  animation: subDropIn .18s var(--ease);
}
.sub-floating-dropdown.is-open { display: flex; }

@keyframes subDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.sub-picker-search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--slate-100);
  position: relative;
  flex-shrink: 0;
}
.sub-picker-search-icon {
  position: absolute;
  left: 22px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  stroke: var(--slate-400); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}
.sub-picker-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--fs-base);
  outline: none;
  background: var(--slate-50);
  color: var(--slate-900);
}
.sub-picker-search input::placeholder { color: var(--slate-400); }
.sub-picker-search input:focus {
  background: white;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(56,173,78,.12);
}

.sub-picker-list {
  flex: 1;
  overflow-y: auto;
  max-height: 270px;
  padding: 4px 0;
}
.sub-picker-empty {
  padding: 24px 16px;
  font-size: var(--fs-base);
  color: var(--slate-500);
  text-align: center;
}

.sub-picker-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .12s var(--ease);
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  font-family: inherit;
}
.sub-picker-option:hover,
.sub-picker-option:focus,
.sub-picker-option.is-active { background: var(--green-50); outline: none; }
.sub-picker-option.is-selected { background: var(--green-50); }
.sub-picker-option.is-selected .sub-picker-option-name { color: var(--green-dark); font-weight: 600; }

.sub-picker-option-thumb {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--slate-100);
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.sub-picker-option-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sub-picker-option-thumb svg {
  width: 14px; height: 14px;
  stroke: var(--slate-400); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.sub-picker-option-meta {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.sub-picker-option-name {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--slate-900);
  line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sub-picker-option-sub {
  font-size: var(--fs-sm);
  color: var(--slate-500);
  margin-top: 2px;
}
.sub-picker-option-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--slate-500);
  font-weight: 700;
  background: var(--slate-100);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ============== PRODUCT CHIP (preselected display) ============== */
.sub-product-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.sub-product-chip-thumb {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: white;
  overflow: hidden;
  flex-shrink: 0;
}
.sub-product-chip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sub-product-chip-meta { flex: 1; min-width: 0; }
.sub-product-chip-name { font-size: var(--fs-md); font-weight: 600; color: var(--slate-900); line-height: 1.3; }
.sub-product-chip-company { font-size: var(--fs-sm); color: var(--slate-500); }

/* ============== CRITERION ROWS ============== */
.sub-criterion-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--slate-100);
}
.sub-criterion-row:last-child { border-bottom: none; }
.sub-criterion-name { font-size: var(--fs-md); font-weight: 600; color: var(--slate-900); }
.sub-criterion-desc { font-size: var(--fs-sm); color: var(--slate-500); margin-top: 2px; }
.sub-criterion-value {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--green-dark);
  min-width: 32px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.sub-criterion-value.is-empty { color: var(--slate-300); font-weight: 400; }
@media (max-width: 600px) {
  /* R5 #5: the stars were forced onto their own full-width row (grid-column:
     1/-1). Because the DOM order is [name+desc] [stars] [value], that pushed the
     numeric value up next to the name and stranded the stars below — the client
     saw stars and the number stacked top/bottom instead of side by side.
     New layout: name + desc span row 1; stars (left) and value (right) share
     row 2. Stars shrunk 24→20 to cut height; tap target stays ~26px (>24px
     WCAG min). */
  .sub-criterion-row { grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 6px; align-items: center; }
  .sub-criterion-row > div:first-child { grid-column: 1 / -1; }
  .sub-criterion-row > .stars-input { grid-column: 1; justify-self: start; gap: 2px; }
  .sub-criterion-row > .sub-criterion-value { grid-column: 2; }
  .sub-criterion-row > .stars-input button { padding: 3px; }
  .sub-criterion-row > .stars-input svg { width: 20px; height: 20px; }
}

/* ============== VISIBILITY CARDS ============== */
.sub-vis-cards { display: flex; flex-direction: column; gap: 10px; }
.sub-vis-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--slate-200);
  background: white;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.sub-vis-card:hover { border-color: var(--slate-300); }
.sub-vis-card.is-selected {
  border-color: var(--green);
  background: var(--green-50);
}
.sub-vis-radio {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--slate-300);
  background: white;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all .15s var(--ease);
  position: relative;
}
.sub-vis-card.is-selected .sub-vis-radio { border-color: var(--green); }
.sub-vis-card.is-selected .sub-vis-radio::after {
  content: ''; position: absolute; inset: 3px;
  background: var(--green); border-radius: 50%;
}
.sub-vis-meta { flex: 1; }
.sub-vis-title { font-size: var(--fs-md); font-weight: 600; color: var(--slate-900); margin-bottom: 2px; }
.sub-vis-desc { font-size: var(--fs-sm); color: var(--slate-500); line-height: 1.5; }

/* ============== FILE DROP ============== */
.sub-file-drop {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1.5px dashed var(--slate-300);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  background: var(--slate-50);
  cursor: pointer;
  transition: all .15s var(--ease);
  width: 100%;
  box-sizing: border-box;
}
.sub-file-drop:hover,
.sub-file-drop.is-dragover { border-color: var(--green); background: var(--green-50); }
.sub-file-drop-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: white;
  color: var(--green-600);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--slate-200);
}
.sub-file-drop-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sub-file-drop-title { font-size: var(--fs-md); font-weight: 600; color: var(--slate-900); margin-bottom: 4px; text-align: left; }
.sub-file-drop-desc { font-size: var(--fs-sm); color: var(--slate-500); line-height: 1.45; text-align: left; }

.sub-file-list {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.sub-file-list:empty { display: none; }
.sub-file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
}
.sub-file-row .attachment-icon { width: 32px; height: 32px; }
.sub-file-row-thumb {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--slate-100);
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--slate-200);
}
.sub-file-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sub-file-row-thumb.is-doc { background: var(--slate-50); color: var(--slate-500); }
.sub-file-row-thumb.is-doc svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sub-file-row-meta { flex: 1; min-width: 0; }
.sub-file-row-name { font-size: var(--fs-base); font-weight: 600; color: var(--slate-900); line-height: 1.3; }
.sub-file-row-size { font-size: var(--fs-xs); color: var(--slate-500); }
.sub-file-row-remove {
  width: 28px; height: 28px;
  background: transparent; border: none; border-radius: var(--radius-sm);
  color: var(--slate-400);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s var(--ease);
}
.sub-file-row-remove:hover { color: var(--red-500); background: var(--red-50); }
.sub-file-row-remove svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

.sub-storage-bar {
  margin-top: 8px;
  background: var(--slate-100);
  border-radius: 4px;
  height: 5px;
  overflow: hidden;
}
.sub-storage-fill { height: 100%; background: var(--green); border-radius: 4px; transition: all .3s var(--ease); }
.sub-storage-bar.is-warn .sub-storage-fill { background: var(--amber-500); }
.sub-storage-status {
  display: flex; justify-content: space-between;
  font-size: var(--fs-sm);
  color: var(--slate-500);
  margin-top: 6px;
}

/* ============== SUMMARY (review/confirm step) ============== */
.sub-summary {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.sub-summary-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 8px 0;
  font-size: var(--fs-base);
  color: var(--slate-500);
  border-bottom: 1px solid var(--slate-200);
}
.sub-summary-row:last-child { border-bottom: none; }
.sub-summary-row b { color: var(--slate-900); font-weight: 600; text-align: right; }

/* Multi-line block rows for "What happened" / "Expected resolution" / "Your review" in
   the pre-submit summary. Render the value below the label rather than to the right so
   long text stays readable. Added when the complaint review-step summary was expanded
   (1.1.45) to actually include the body fields the user filled in. */
.sub-summary-row.sub-summary-row-block { flex-direction: column; gap: 6px; }
.sub-summary-row.sub-summary-row-block > span {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
}
.sub-summary-body {
  font-size: var(--fs-base);
  color: var(--slate-900);
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ============== reCAPTCHA mock ============== */
.sub-recaptcha {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border: 1px solid var(--slate-300);
  background: var(--slate-50);
  border-radius: var(--radius-md);
  width: 304px;
  max-width: 100%;
}
.sub-recaptcha input { width: 22px; height: 22px; }
.sub-recaptcha-label { font-size: var(--fs-md); color: var(--slate-700); flex: 1; }
.sub-recaptcha-logo { text-align: right; font-size: 9px; color: var(--slate-400); }
.sub-recaptcha-logo b { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--slate-600); margin-bottom: 1px; }

/* ============== FOOTER ============== */
.sub-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  flex-shrink: 0;
}
.sub-modal-foot .btn { min-width: 120px; }
.sub-modal-foot-spacer { flex: 1; }

/* ============== SUCCESS STATE ============== */
.sub-modal-step[data-panel="success"] { text-align: center; padding: 16px 0 8px; }
.sub-success-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.sub-success-icon svg { width: 36px; height: 36px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ============== FORM FIELDS (reuse fb-form-group + textarea support) ============== */
.sub-modal .fb-form-group { margin-bottom: 14px; }
.sub-modal .fb-form-group textarea {
  width: 100%;
  min-height: 110px;
  padding: 16px 14px 12px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--fs-lg);
  color: var(--slate-900);
  background: white;
  outline: none;
  resize: vertical;
  line-height: 1.5;
  transition: all .2s var(--ease);
}
.sub-modal .fb-form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(56,173,78,.15);
}
.sub-modal .fb-form-group:has(textarea) label { top: 14px; transform: none; }
.sub-modal .fb-form-group:has(textarea).focused label,
.sub-modal .fb-form-group:has(textarea).filled label { top: 0; transform: none; }

.sub-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) { .sub-form-grid-2 { grid-template-columns: 1fr; } }

/* Date picker (<input type="date">) — the browser-default rendering is wildly
   inconsistent across Chrome / Safari / Firefox: no border, weird placeholder
   formatting, narrow click target. Match the design of the other text inputs. */
.sub-modal .fb-form-group input[type="date"] {
  width: 100%;
  height: 52px;
  padding: 22px 14px 8px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--fs-lg);
  color: var(--slate-900);
  background: white;
  outline: none;
  line-height: 1.4;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  /* Chrome shows a vendor calendar icon by default; tame its weight + alignment. */
  appearance: none;
  -webkit-appearance: none;
}
.sub-modal .fb-form-group input[type="date"]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(56,173,78,.15);
}
.sub-modal .fb-form-group input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  filter: invert(28%) sepia(38%) saturate(789%) hue-rotate(94deg) brightness(96%) contrast(90%);
  transition: opacity .15s var(--ease);
}
.sub-modal .fb-form-group input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
/* Float the label even when the date field is "empty" — browsers report a
   date input as having no value, so the standard .filled/.focused class
   toggle doesn't apply. Always position the label at the top for date inputs
   to keep the picker chrome from overlapping with the placeholder. */
.sub-modal .fb-form-group.sub-form-group-date label {
  top: 6px;
  transform: none;
  font-size: var(--fs-xs);
  color: var(--slate-500);
  font-weight: 600;
}

.sub-field-counter {
  text-align: right;
  margin-top: -8px;
  margin-bottom: 12px;
  font-size: var(--fs-sm);
  color: var(--slate-400);
  font-variant-numeric: tabular-nums;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 768px) {
  .sub-modal-backdrop { padding: 0; align-items: flex-end; }
  /* 90vh leaves a small gap at the top so the user can see they're in a
     modal (not a separate page) — the prior 95vh was almost-fullscreen and
     made the chrome above feel chopped off. Height is fixed (not max-)
     so long forms always scroll inside the modal instead of pushing the
     close button off-screen. */
  .sub-modal {
    height: 90vh;
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
  .sub-modal-head { padding: 14px 18px; }
  .sub-modal-body { padding: 24px 20px; }
  .sub-modal-foot { padding: 14px 18px; }
  .sub-modal-progress-wrap { padding: 12px 18px 0; }
  .sub-step-title { font-size: 22px; }
  .sub-step-subtitle { font-size: var(--fs-md); }

  /* Stepper — "active-label-only" pattern.
     On phones, all 5-8 step labels never fit horizontally (Georgian labels
     are long, complaint flow has 8 steps). Solution: only the ACTIVE step
     shows its label; the others collapse to just the "01 / 02 …" number.
     Animating max-width + opacity gives a smooth grow/shrink when the user
     advances steps. The flex container uses space-between so the numbers
     redistribute evenly across the freed-up horizontal space. */
  .sub-modal-progress {
    justify-content: space-between;
    gap: 4px;
    overflow-x: visible;
  }
  .sub-modal-progress-step { gap: 4px; flex-shrink: 1; min-width: 0; }
  .sub-modal-progress-label {
    max-width: 0;
    opacity: 0;
    margin-left: -4px;  /* eat the parent gap so collapsed steps sit flush */
    overflow: hidden;
    transition:
      max-width   .35s var(--ease),
      opacity     .25s var(--ease) .05s,
      margin-left .35s var(--ease);
  }
  .sub-modal-progress-step.is-active .sub-modal-progress-label {
    max-width: 200px;
    opacity: 1;
    margin-left: 0;
  }
  /* Active step's underline indicator was anchored to the full step width
     (number + label). With labels collapsing, that broke. Constrain to the
     step's visible content. */
  .sub-modal-progress-step.is-active::after { left: 0; right: 0; }
}

/* ============== EXTRA-NARROW PHONES (≤480px) ============== */
@media (max-width: 480px) {
  /* Bottom action bar — compact layout.
     Removed .min-width:120px so Continue can fill remaining width; Back
     shrinks to its content. Result: a clean [Back] [───────Continue───────]
     pair that fits 360px wide easily. */
  .sub-modal-foot { padding: 12px 14px; gap: 8px; }
  .sub-modal-foot .btn { min-width: 0; padding: 0 14px; height: 44px; font-size: var(--fs-md); }
  .sub-modal-foot [data-sub-back] { flex: 0 0 auto; }
  .sub-modal-foot [data-sub-next],
  .sub-modal-foot [data-sub-submit] { flex: 1 1 auto; justify-content: center; }
}

/* ============================================================
   v1.2.107 (C15) — Mobile vertical-rhythm tightening.

   Client report: "შეფასების მობილურ ვერსიაში ძალიან იშლება სიმაღლეში ფორმა"
   (the review form stretches way too tall on mobile — reduce spacings).

   The existing @media blocks above already handle a few specific changes
   (sub-modal-body padding tablet→24/20, step-title font 22, subtitle font
   var(--fs-md)), but the chunkier offenders — step-subtitle's 24px margin,
   the 110px textarea min-height, the 14px-per-criterion padding — were
   untouched. Each step ended up ~30-50px taller than necessary, and over a
   6-step wizard that compounds to a screen-and-a-half scroll.

   This block tightens those targets at ≤600px. Numbers chosen so the form
   still breathes on tablet (768) but feels closer to the prototype on a
   real iPhone-size viewport.
   ============================================================ */
@media (max-width: 600px) {
  .sub-modal-body { padding: 20px 18px; }

  .sub-step-eyebrow { margin-bottom: 8px; padding: 3px 8px; }

  .sub-step-title { font-size: 20px; margin-bottom: 4px; line-height: 1.25; }
  .sub-step-subtitle {
    font-size: var(--fs-md);
    line-height: 1.45;
    margin-bottom: 14px;  /* was 24 */
  }

  /* Form fields: drop the textarea's giant min-height + tighten group gap. */
  .sub-modal .fb-form-group { margin-bottom: 10px; }
  .sub-modal .fb-form-group textarea {
    min-height: 80px;     /* was 110 */
    padding: 12px 12px 10px;
  }

  /* Criterion rows: vertical padding 14→10 saves 4px × ~5 criteria = 20px. */
  .sub-criterion-row { padding: 6px 0; }
  .sub-criterion-name { font-size: var(--fs-md); }

  /* Choice cards (mode picker) — compact icon + text spacing. */
  .sub-choice-card {
    padding: 14px;
    gap: 8px;
  }

  /* Progress bar — already thin via the @768px stepper-collapse above; cut
     the wrap padding-top so the body starts closer to the chrome. */
  .sub-modal-progress-wrap { padding-top: 10px; }
}

/* Even tighter on small phones (≤400px) — common Android low-end + iPhone
   SE. Same targets, smaller numbers. */
@media (max-width: 400px) {
  .sub-modal-body { padding: 16px 14px; }
  .sub-step-title { font-size: 19px; }
  .sub-step-subtitle { margin-bottom: 12px; }
  .sub-modal .fb-form-group textarea { min-height: 72px; }
}

/* ============================================================
   v1.2.115 — Email-verify PRE-lock gate
   ============================================================
   Logged-in users who haven't verified their email see this overlay
   on top of the form when they open the submission modal — so they
   don't fill out the whole form, hit submit, and lose all their work.
   The underlying form (progress strip + body + footer) stays visually
   present (blurred backdrop) so they see what they're about to be able
   to do; pointer-events are disabled while gated.
   v1.2.117: anchored to .sub-modal (the white card) instead of just
   .sub-modal-body — so the overlay covers progress tabs + footer too,
   not only the form area. The header (logo + close X) is raised above
   the overlay via z-index so users can always dismiss the modal. */
.sub-modal.is-verify-gated > :not(.sub-verify-gate):not(.sub-modal-head) {
  pointer-events: none;
  filter: blur(3px);
  opacity: .35;
}
.sub-modal.is-verify-gated > .sub-modal-head {
  position: relative;
  z-index: 10;
}
.sub-verify-gate {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: inherit; /* honour the modal's rounded corners */
  overflow-y: auto;       /* scroll the card if the modal is short (mobile) */
}
.sub-verify-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
}
.sub-verify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green-50, #ECFDF5);
  color: var(--green-dark, #166534);
  margin-bottom: 16px;
}
.sub-verify-icon svg { width: 28px; height: 28px; stroke-width: 2; }
.sub-verify-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--slate-900, #0F172A);
}
.sub-verify-body {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--slate-700, #334155);
}
.sub-verify-email {
  margin: 0 0 18px;
  padding: 10px 14px;
  background: var(--slate-50, #F8FAFC);
  border-radius: var(--radius-md, 8px);
  font-size: 13px;
  color: var(--slate-700, #334155);
  word-break: break-all;
}
.sub-verify-email span { color: var(--slate-500, #64748B); margin-right: 6px; }
.sub-verify-email strong { color: var(--slate-900, #0F172A); font-weight: 600; }
.sub-verify-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.sub-verify-resend {
  appearance: none;
  border: 0;
  background: var(--green, #16A34A);
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: background .15s var(--ease, ease);
}
.sub-verify-resend:hover:not(:disabled) { background: var(--green-dark, #166534); }
.sub-verify-resend:disabled { opacity: .65; cursor: default; }
.sub-verify-link {
  color: var(--slate-600, #475569);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.sub-verify-link:hover { color: var(--slate-900, #0F172A); text-decoration: underline; }
.sub-verify-feedback {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  min-height: 1.5em;
}
.sub-verify-feedback.is-success { color: var(--green-dark, #166534); }
.sub-verify-feedback.is-error   { color: var(--red-600, #DC2626); }

@media (max-width: 480px) {
  .sub-verify-card { padding: 20px 18px; }
  .sub-verify-title { font-size: 16px; }
  .sub-verify-body { font-size: 13px; }
  .sub-verify-actions { flex-direction: column; gap: 8px; }
  .sub-verify-resend { width: 100%; }
}
