/* The promoter page: one phone-width column over the website's stylesheet, which gives the fields,
   buttons, dispenser cards and steppers. Here: the layout, and the colours of a page read in the sun
   (docs/04-website.md §12.3): blue is what he can press, red an error or what commits money, amber
   what needs him, green what is free or done; every text at least 4.5:1 and every field's edge 3:1. */
.seller-page {
  background: var(--bg-soft);
  --success: #137a43;
  --success-rgb: 19, 122, 67;
  --success-050: #e7f5ec;
  --error: #b51e17;
  --amber: #8a5a00;
  --amber-050: #fff7e0;
  --amber-100: #f3dc94;
  --edge: #7b8a9e;
}
/* Blue for what he presses. Red stays rare so it keeps meaning something: an error, or the two
   buttons that commit money, the sale's and its confirm. */
.seller-page .btn-primary {
  background: var(--blue);
  box-shadow: 0 10px 22px -12px rgba(var(--blue-rgb), 0.8);
}
.seller-page .btn-primary:hover {
  background: var(--blue-dark);
}
.seller-page .sell-submit-sale,
.seller-page .sell-commit {
  background: var(--red);
  box-shadow: 0 10px 22px -12px rgba(var(--red-rgb), 0.8);
}
.seller-page .sell-submit-sale:hover,
.seller-page .sell-commit:hover {
  background: var(--red-dark);
}
/* A field's edge is what shows it is there, and empty, in the sun. */
.seller-page .field {
  --border: var(--edge);
}
.seller-page strong {
  color: var(--ink);
}
.seller-page.sheet-open {
  overflow: hidden;
}

.seller-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.seller-header img {
  width: 40px;
  height: 40px;
}
.seller-header h1 {
  flex: 1;
  font-size: 1.1rem;
  color: var(--blue);
}
.seller-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--slate);
  white-space: nowrap;
}

.seller-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0.75rem 16px 2.5rem;
}

.sell-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.sell-section h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: var(--blue);
  margin-bottom: 0.75rem;
}
.sell-section .field {
  margin-bottom: 0.75rem;
}
.sell-section .step-error {
  margin: -0.25rem 0 0.75rem;
}
.sell-section .step-error:last-child {
  margin: 0.5rem 0 0;
}
.field select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  min-height: 50px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--field);
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--ink);
}
.field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(var(--blue-rgb), 0.16);
}
.field.invalid select {
  border-color: var(--error);
  background: var(--red-050);
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.row2 .field {
  min-width: 0;
}

.addr-row {
  display: flex;
  gap: 0.5rem;
}
.addr-row input {
  flex: 1;
  min-width: 0;
}
.locate-btn {
  flex: none;
  width: 52px;
  min-height: 50px;
  font-size: 1.35rem;
  cursor: pointer;
  border: 1.5px solid var(--celeste-100);
  border-radius: var(--radius);
  background: var(--celeste-050);
}
.locate-btn[disabled] {
  opacity: 0.55;
  cursor: progress;
}

/* Warnings that never block the submit (R5, the same phone). */
.sell-note {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--slate);
  background: var(--amber-050);
  border: 1px solid var(--amber-100);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  margin: -0.25rem 0 0.75rem;
}
.sell-note.info {
  background: var(--celeste-050);
  border-color: var(--celeste-100);
}
.sell-days .sell-note {
  margin: 0;
}
.sell-hint {
  color: var(--muted);
  font-size: 0.9rem;
}
.sell-hint + .btn {
  margin-top: 0.5rem;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.choices + .choices,
.choices + .sell-hint {
  margin-top: 0.6rem;
}
.choice {
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  border: 1.5px solid var(--edge);
  border-radius: var(--radius-pill);
  background: var(--field);
  font: inherit;
  font-size: 0.95rem;
  color: var(--slate);
}
.choice::first-letter {
  text-transform: uppercase;
}
.choice[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}

.sell-section .coverage-anim {
  padding: 0;
}
.sell-section .canister {
  width: 56px;
}
.sell-section .status-msg {
  padding: 0.4rem 0 0;
  font-size: 0.9rem;
}

.info-btn {
  min-height: 44px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
  background: none;
  border: 0;
  padding: 0 0.25rem;
  cursor: pointer;
}

.prod-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.prod-name {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.25;
}
/* The price, and under it how many go free («1 Gratis»). */
.prod-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.prod-row .qty-stepper {
  margin: 0;
  padding: 0;
  gap: 0.4rem;
}
.prod-row .qty-btn {
  width: 44px;
  height: 44px;
}
.prod-abono {
  grid-template-columns: 1fr auto;
}
.sell-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  font-weight: 700;
  color: var(--ink);
}
.sell-total span:last-child {
  font-variant-numeric: tabular-nums;
}

.sell-submit {
  width: 100%;
  /* Sample and sale have their own colours; a fade between them reads as a third one. */
  transition: none;
}

.sell-done {
  text-align: center;
}
.sell-done .status-msg {
  padding-top: 0.5rem;
  font-size: 1.2rem;
}
.sell-done-line {
  color: var(--slate);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.sell-done-actions {
  display: grid;
  gap: 0.6rem;
}

/* «ⓘ Ver»: the website's dispenser cards, rising from the bottom. */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(16, 20, 23, 0.45);
}
.sheet[hidden] {
  display: none;
}
.sheet-panel {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1rem 16px 1.25rem;
}
.sheet .dispenser-grid {
  grid-template-columns: 1fr;
}
.sheet .dispenser-card-wide {
  flex-direction: column;
}
.sell-close {
  width: 100%;
}

/* The tabs under the header: «Cargar», «Pedidos» and the Caja (04 §12.5, R19). */
.seller-tabs {
  position: sticky;
  top: 57px;
  z-index: 19;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.seller-tabs button {
  padding: 0.65rem 0.5rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
}
.seller-tabs button[aria-pressed="true"] {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* The account menu (04 §12.6). */
.seller-account {
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
}
.seller-menu {
  position: absolute;
  top: 100%;
  right: 16px;
  min-width: 220px;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.seller-menu-item {
  width: 100%;
  padding: 0.6rem;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.seller-menu-ask {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--ink);
}
.seller-menu-actions {
  display: flex;
  gap: 0.5rem;
}
.seller-login .btn {
  width: 100%;
}

.free-tag {
  color: var(--success);
  font-weight: 700;
}

/* Free sample or sale (R14): the line above the button, and the sample's own colour. The sale's
   line is something to charge, so amber, like the confirm sheet's «no la podés cambiar». */
.sell-footer {
  margin: 0.25rem 0 0.9rem;
}
.sell-free {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  background: var(--success-050);
  color: var(--success);
  font-weight: 600;
  text-align: center;
}
.sell-warn {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--amber-100);
  border-radius: var(--radius);
  background: var(--amber-050);
  color: var(--ink);
  font-weight: 600;
}
.seller-page .sell-submit:not(.sell-submit-sale),
.seller-page .sell-submit:not(.sell-submit-sale):hover {
  background: var(--success);
  box-shadow: 0 10px 22px -12px rgba(var(--success-rgb), 0.8);
}
.sell-days-info {
  color: var(--success);
  font-weight: 600;
}

/* «Esta casa ya tiene una muestra de …» (R16): a warning, nothing to tap. */
.sell-banner {
  margin: 0.5rem 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--amber-100);
  border-radius: 8px;
  background: var(--amber-050);
  color: var(--slate);
  font-size: 0.9rem;
  font-weight: 600;
}

/* The confirm sheet (R2, R18). */
.confirm-title {
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
  color: var(--blue);
}
.confirm-who {
  font-weight: 600;
  color: var(--ink);
}
.confirm-lines {
  list-style: none;
  margin: 0.6rem 0 0;
}
.confirm-lines li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.confirm-how {
  margin: 0.75rem 0 0.4rem;
  font-weight: 600;
  color: var(--ink);
}
.confirm-panel .sell-warn {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}
.confirm-panel .sell-close {
  margin-top: 0.6rem;
}

/* «Pedidos» and the Caja's rows. */
.orders-search {
  margin-bottom: 0.75rem;
}
.order-row {
  padding: 0.8rem;
  margin-bottom: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.order-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.order-when {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.order-line {
  margin: 0.15rem 0 0;
  color: var(--slate);
  font-size: 0.9rem;
}
.order-status {
  font-weight: 600;
}
.order-edited {
  color: var(--muted);
  font-size: 0.8rem;
}
.order-row .btn {
  margin-top: 0.5rem;
}

/* The Caja (R19). */
.caja-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.caja-step {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}
.caja-step:disabled {
  opacity: 0.35;
  cursor: default;
}
.caja-sums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.caja-sums div {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.caja-sums span {
  color: var(--muted);
  font-size: 0.85rem;
}
.caja-sums strong {
  font-size: 1.2rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.caja-sums .caja-total {
  grid-column: 1 / -1;
  background: var(--celeste-050);
  border-color: var(--celeste-100);
}
.caja-sums small {
  color: var(--slate);
}
.caja-heading {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
  color: var(--blue);
}
.caja-ranking {
  list-style: none;
}
.caja-ranking > li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.caja-ranking > li.is-me {
  border-color: var(--blue);
  background: var(--celeste-050);
  font-weight: 700;
}
.caja-pos {
  min-width: 1.6rem;
  font-weight: 700;
  color: var(--blue);
}
.caja-name {
  flex: 1;
}
.caja-amount {
  font-variant-numeric: tabular-nums;
}
.caja-team > li {
  display: block;
  padding: 0;
}
.caja-person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.caja-person .caja-amount {
  font-weight: 700;
}
.caja-split {
  flex-basis: 100%;
  padding-left: 2.1rem;
  color: var(--muted);
}
.caja-loads {
  padding: 0 0.6rem 0.4rem;
}

/* The login's password, with its show/hide eye inside the field's right edge. */
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 3.2rem;
}
.password-eye {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.password-eye:hover,
.password-eye[aria-pressed="true"] {
  color: var(--blue);
}
.password-eye:focus-visible {
  outline: 2px solid var(--celeste-2);
  outline-offset: -4px;
}

/* «Tocá atrás otra vez para salir». */
.seller-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
}
.seller-toast[hidden] {
  display: none;
}

/* What is due (04 §12.8): a draft with no location or day, or a load still on the phone. */
.order-row.is-due {
  border-color: #f0b429;
  background: #fffaeb;
}
.due-icon {
  flex: none;
  color: var(--amber);
  vertical-align: -3px;
  margin-right: 0.3rem;
}
.orders-due {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #f0b429;
  border-radius: var(--radius);
  background: #fffaeb;
  color: var(--ink);
  font-weight: 600;
}
.tab-badge {
  display: inline-block;
  min-width: 1.25rem;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--amber);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.25rem;
  vertical-align: 1px;
}
.tab-badge[hidden] {
  display: none;
}
.seller-offline {
  position: sticky;
  top: 105px;
  z-index: 18;
  margin: 0;
  padding: 0.5rem 16px;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
}
.seller-offline[hidden] {
  display: none;
}
.sell-done-line small {
  color: var(--muted);
}
