/* ==========================================================================
   Wholesale application, dealer portal and dealer pricing.
   Built on the Heritage Table tokens in tokens.css.
   ========================================================================== */

/* ------------------------------------------------------------ application */

.ac-apply { max-width: 680px; margin: 0 auto; }

.ac-apply__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ac-apply__field--full { grid-column: 1 / -1; }

.ac-optional {
  text-transform: none;
  letter-spacing: 0;
  color: #B0987A;
}

/* Honeypot: present for bots, gone for people and screen readers. */
.ac-apply__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ac-apply__submit { width: 100%; margin-top: 22px; text-align: center; }

.ac-apply__foot {
  text-align: center;
  font-size: 13px;
  color: var(--ac-ink-muted);
  margin: 20px 0 0;
}
.ac-apply__foot a { color: var(--ac-accent-deep); border-bottom: 1px solid var(--ac-accent); text-decoration: none; }

.ac-apply-done { max-width: 560px; margin: 0 auto; text-align: center; padding: 50px 34px; }
.ac-apply-done__mark {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--ac-ink); color: var(--ac-accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin: 0 auto 24px;
}
.ac-apply-done p { margin-left: auto; margin-right: auto; }

@media (max-width: 1010px) {
  .ac-apply__grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------- minimums */

.ac-minbar {
  background: var(--ac-surface);
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius-card);
  padding: 18px 20px;
  margin-bottom: var(--ac-space-md);
}
.ac-minbar__track {
  height: 6px;
  background: var(--ac-surface-alt);
  border-radius: var(--ac-radius-pill);
  overflow: hidden;
}
.ac-minbar__track span {
  display: block;
  height: 100%;
  background: var(--ac-accent);
  border-radius: var(--ac-radius-pill);
  transition: width .4s ease;
}
.ac-minbar p {
  margin: 10px 0 0;
  font-family: var(--ac-font-label);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ac-accent-deep);
}

/* ------------------------------------------------------------ dealer price */

.ac-price-wholesale { font-weight: 600; color: var(--ac-ink); }
.ac-price-retail del { color: var(--ac-ink-muted); font-size: .85em; }
.ac-price-tag {
  display: inline-block;
  font-family: var(--ac-font-label);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ac-accent-deep);
}

/* ----------------------------------------------------------------- portal */

.ac-portal__title { font-size: clamp(28px, 3.2vw, 38px); margin: 0 0 4px; }
.ac-portal__sub { color: var(--ac-ink-soft); margin: 0 0 28px; font-size: 15px; }

.ac-portal__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: var(--ac-space-md);
}

.ac-stat {
  background: var(--ac-surface);
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius-card);
  padding: 22px 24px;
}
.ac-stat--dark { background: var(--ac-ink); border-color: var(--ac-ink); }
.ac-stat .ac-label { display: block; margin-bottom: 10px; font-size: 11px; letter-spacing: .14em; }
.ac-stat__value {
  display: block;
  font-family: var(--ac-font-heading);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  color: var(--ac-ink);
}
.ac-stat--dark .ac-stat__value { color: var(--ac-on-dark); }
.ac-stat__foot { display: block; margin-top: 8px; font-size: 12.5px; color: var(--ac-ink-muted); }
.ac-stat--dark .ac-stat__foot { color: #C9B08A; }

.ac-portal__block { margin-bottom: var(--ac-space-md); padding: 24px 26px; }
.ac-portal__blockhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ac-portal__block h3 { margin: 0; font-size: 22px; font-weight: 600; }
.ac-portal__more {
  font-family: var(--ac-font-label);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ac-accent-deep);
  text-decoration: none;
}
.ac-portal__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.ac-empty { color: var(--ac-ink-muted); margin-bottom: 18px; }

/* Order rows */
.ac-orderrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #F0E6D4;
  gap: 16px;
}
.ac-orderrow:last-child { border-bottom: 0; }
.ac-orderrow a { text-decoration: none; font-size: 14.5px; }
.ac-orderrow__meta { display: block; font-size: 12.5px; color: var(--ac-ink-muted); }
.ac-orderrow__right { display: flex; align-items: center; gap: 16px; }
.ac-orderrow__total { font-family: var(--ac-font-label); font-size: 15px; }

.ac-pill { background: var(--ac-surface-alt); color: var(--ac-ink-soft); }
.ac-pill--completed  { background: #E4EDE2; color: #40632F; }
.ac-pill--processing { background: #F6E9CC; color: #8A6212; }
.ac-pill--on-hold,
.ac-pill--pending    { background: #F3E2D6; color: #9A5A2A; }
.ac-pill--cancelled,
.ac-pill--failed     { background: #F0DCD8; color: #94402F; }

/* Reorder list */
.ac-reorder { padding: 6px 24px 24px; }
.ac-reorder__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #F0E6D4;
}
.ac-portal__grid .ac-reorder__row {
  border: 1px solid #EADDC6;
  border-radius: 6px;
  padding: 12px;
}
.ac-reorder__img img {
  width: 54px; height: 54px;
  object-fit: cover;
  border-radius: var(--ac-radius-input);
  background: var(--ac-surface-alt);
  display: block;
}
.ac-reorder__name { flex: 1; min-width: 0; }
.ac-reorder__name strong {
  display: block;
  font-family: var(--ac-font-heading);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
}
.ac-reorder__price { font-size: 12.5px; color: var(--ac-ink-muted); }
.ac-reorder__qty {
  width: 84px;
  padding: 9px 10px;
  border: 1px solid var(--ac-line-warm);
  border-radius: var(--ac-radius-pill);
  text-align: center;
  font-family: var(--ac-font-body);
  background: var(--ac-field);
}
.ac-reorder__add {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ac-ink);
  color: var(--ac-on-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  text-decoration: none;
  flex-shrink: 0;
}
.ac-reorder__foot { padding-top: 20px; }

@media (max-width: 1010px) {
  .ac-portal__stats,
  .ac-portal__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .ac-portal__stats,
  .ac-portal__grid { grid-template-columns: 1fr; }
  .ac-orderrow { flex-direction: column; align-items: flex-start; gap: 8px; }
}

.ac-portal__note {
  margin: -6px 0 var(--ac-space-md);
  font-size: 14px;
  color: var(--ac-ink-soft);
}


/* --------------------------------------------------------------- reorder
   The row was a flex line whose quantity field had no flex basis, so once a
   wider input rule reached it the field ate the row and the product name
   collapsed to zero. A three-track grid can't be pushed around the same way. */

.ac-reorder__row {
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 18px;
}
.ac-portal__grid .ac-reorder__row { grid-template-columns: 56px minmax(0, 1fr) 34px; gap: 12px; }

.ac-reorder__name { min-width: 0; }
.ac-reorder__name strong { overflow-wrap: anywhere; }
.ac-reorder__price { display: block; margin-top: 3px; }

.ac-reorder__qty {
  width: 100% !important;
  max-width: 112px;
  padding: 11px 10px !important;
  text-align: center;
  border-radius: var(--ac-radius-input) !important;
}

.ac-reorder__img { display: block; }
.ac-reorder__img img {
  width: 56px !important;
  height: 56px !important;
  background: transparent;
  mix-blend-mode: multiply;
}

.ac-reorder__foot {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--ac-line);
  margin-top: 8px;
}

@media (max-width: 700px) {
  .ac-reorder__row { grid-template-columns: 48px minmax(0, 1fr) 92px; gap: 12px; }
  .ac-reorder__img img { width: 48px !important; height: 48px !important; }
}

/* Names run long in the narrow dashboard tiles. */
.ac-portal__grid .ac-reorder__name strong { font-size: 16px; line-height: 1.25; }
.ac-portal__grid .ac-reorder__price { font-size: 12px; }
