/* ==========================================================================
   TruDealers /verify - store cards, cart details and mobile cart bar
   --------------------------------------------------------------------------
   Loaded after verify.css. Data-sheet look: solid surfaces, 1px borders,
   no backdrop-filter, no blur, no infinite animation.
   ========================================================================== */

/* --- Product card grid -------------------------------------------------- */
.vf-prod-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
@media (min-width: 561px) {
  .vf-prod-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* --- Product card ------------------------------------------------------- */
.vf-prod {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  background: #0B111A;
  border: 1px solid #1E2A36;
  border-radius: 14px;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: border-color 160ms ease;
}
.vf-prod:hover { border-color: #2A3A4A; }
.vf-prod.is-added { border-color: rgba(86, 225, 233, 0.55); }
.vf-prod.is-blocked { border-style: dashed; }

.vf-prod__head { display: flex; align-items: flex-start; gap: 12px; }
.vf-prod__icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #101925;
  border: 1px solid #1E2A36;
  color: #56E1E9;
}
.vf-prod__name {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: #F4F7FB;
  overflow-wrap: anywhere;
}
.vf-prod__desc {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #CBD5E1;
}
.vf-prod__needs,
.vf-prod__meta {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #CBD5E1;
}
.vf-prod__needs span,
.vf-prod__meta span {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8E9EB3;
}
.vf-prod__sample {
  font-size: 0.8rem;
  color: #56E1E9;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.vf-prod__note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #1E2A36;
  background: #0E1621;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #CBD5E1;
}
.vf-prod__note strong { color: #F4F7FB; font-weight: 700; }
/* verify.css gives these classes a top border for the legacy rows. */
.vf-prod .vf-check-blocked-note,
.vf-prod .vf-check-needed { margin-top: 0; padding: 8px 10px; border: 1px solid #1E2A36; background: #0E1621; }

.vf-prod__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #1E2A36;
}
.vf-prod__price {
  display: grid;
  gap: 2px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.1;
  color: #56E1E9;
  font-variant-numeric: tabular-nums;
}
.vf-prod__price small {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: #8E9EB3;
}
.vf-prod__price .vf-prod__pack { font-size: 0.7rem; }

/* Add uses the house td-btn--primary face (dark titanium, cyan text);
   Added/Included uses td-btn--secondary. No solid colour fills here. */
.vf-prod__add {
  flex-shrink: 0;
  min-width: 96px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 0.92rem;
}
.vf-prod__add[disabled] { cursor: not-allowed; }

/* --- Package (bundle) cards ---------------------------------------------- */
/* Same data-sheet card as a product (.vf-prod), above the product grid of its
   area. Add package uses the house td-btn--primary face; no solid fills. */
.vf-bundles:has(.vf-pkg-grid) { display: block; margin-bottom: 14px; }
.vf-pkg-title { margin: 0 0 10px; }
.vf-pkg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
@media (min-width: 561px) {
  .vf-pkg-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
.vf-pkg { border-color: #24384A; }
.vf-pkg.is-added { border-color: rgba(86, 225, 233, 0.55); }
.vf-pkg__titles { display: grid; gap: 4px; min-width: 0; }
.vf-pkg__tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8E9EB3;
}
.vf-pkg__list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vf-pkg__list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #CBD5E1;
}
.vf-pkg__list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  border: 1px solid #56E1E9;
}
.vf-prod__price .vf-pkg__save {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600;
  color: #9BE8EC;
}
.vf-pkg__add { min-width: 132px; }

/* Cart: a package is one priced line with its checks listed under it. */
.vf-cart-line--pkg span:first-child { color: var(--td-text); font-weight: 600; }
.vf-cart-line--member { padding-left: 14px; font-size: 0.8rem; }
.vf-cart-line--member span:last-child { font-weight: 600; color: var(--td-text-muted); }

/* The check grid replaces the old "Available checks" list spacing. */
.vf-checks:has(.vf-prod-grid) { gap: 0; }

/* --- Cart chrome -------------------------------------------------------- */
.vf-cart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.vf-cart-title { font-size: 1.15rem; margin: 0; }
.vf-cart-empty { margin: 0; font-size: 0.9rem; line-height: 1.5; color: #CBD5E1; }
.vf-cart-empty[hidden], .vf-cart-body[hidden] { display: none; }
.vf-cart-body { display: grid; gap: 12px; }
.vf-cart-mode { display: flex; flex-wrap: wrap; gap: 8px; }
.vf-cart-mode .td-btn { padding: 9px 14px; font-size: 0.8rem; min-height: 40px; }

/* "Details we need": per-check fields for products in the cart. */
.vf-cart-details { display: grid; gap: 12px; padding-top: 12px; border-top: 1px solid #1E2A36; }
.vf-cart-details[hidden] { display: none; }
.vf-detail__title { margin: 0; font-family: 'Sora', sans-serif; font-size: 1rem; font-weight: 700; color: #F4F7FB; }
.vf-detail { display: grid; gap: 8px; }
.vf-detail__name {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #56E1E9;
}
.vf-detail .vf-check-fields { padding-top: 0; border-top: 0; }
/* The rail is narrow: one field per row even on desktop. */
.vf-rail .vf-fields-2col { grid-template-columns: minmax(0, 1fr); }

.vf-paymethod-default { margin: 0; font-size: 0.84rem; line-height: 1.5; color: #CBD5E1; }
.vf-otherpay { border: 1px solid #1E2A36; border-radius: 10px; background: #0E1621; }
.vf-otherpay > summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #CBD5E1;
  list-style: none;
}
.vf-otherpay > summary::-webkit-details-marker { display: none; }
.vf-otherpay > summary::after { content: '+'; margin-left: auto; font-family: 'JetBrains Mono', ui-monospace, monospace; color: #8E9EB3; }
.vf-otherpay[open] > summary::after { content: '-'; }
.vf-otherpay > summary:focus-visible { outline: 2px solid #56E1E9; outline-offset: 2px; border-radius: 10px; }
.vf-otherpay__body { display: grid; gap: 12px; padding: 0 14px 14px; }

.vf-pay[disabled] { cursor: not-allowed; }

.vf-paytrust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #8E9EB3;
}
.vf-paytrust a { color: #CBD5E1; text-decoration: underline; text-underline-offset: 2px; }
.vf-paytrust a:hover { color: #56E1E9; }

/* Report card stays out of the way until portal-app.js writes a report. */
.vf-report:has(#portalReportBody:empty) { display: none; }
.vf-report__title { font-size: 1.25rem; margin: 0 0 12px; }

/* --- Mobile cart bar (< 1024px) ----------------------------------------- */
.vf-mobilebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #05080D;
  border-top: 1px solid #1E2A36;
  transition: transform 180ms ease;
}
.vf-mobilebar.is-cart-visible { transform: translateY(110%); }
.vf-mobilebar__summary {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: #05080D;
  color: #CBD5E1;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.vf-mobilebar.has-items .vf-mobilebar__summary { color: #F4F7FB; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.vf-mobilebar__pay { flex-shrink: 0; min-height: 44px; padding: 10px 16px; font-size: 0.88rem; }
.vf-mobilebar__pay[hidden] { display: none; }

@media (max-width: 1023px) {
  /* Keep the footer clear of the fixed bar. */
  body > footer.footer { padding-bottom: 104px !important; }
}
@media (min-width: 1024px) {
  .vf-mobilebar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vf-prod, .vf-prod__add, .vf-mobilebar, .vf-pkg { transition: none !important; }
}
