/* =============================== */
/* Price Progress Rail             */
/* =============================== */

.price-progress {
  margin-bottom: 20px;
}

/* ---------- Top Controls ---------- */

.price-progress-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.price-progress-controls .left-controls {
  display: flex;
  gap: 8px;
}

/* ---------- Rail Container ---------- */

.price-progress-rail {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 28px 0 16px;
}

/* ---------- Rail Line ---------- */

.rail-track {
  position: absolute;
  top: 14px; /* adjust for larger dots */
  left: 0;
  right: 0;
  height: 4px; /* was 2px */
  background-color: #999; /* was #ccc */
  z-index: 0;
}

/* ---------- Stage Column ---------- */

.rail-stage {
  position: relative;
  flex: 1 1 0; /* column geometry stays fixed */
  min-width: 0;
  text-align: center;
  z-index: 1;
}

/* ---------- Anchor (DOT IS AUTHORITY) ---------- */

.rail-anchor {
  position: relative;
}

/* ---------- Dot ---------- */

.rail-dot {
  width: 28px; /* 2× size */
  height: 28px;
  border-radius: 50%;
  background-color: #000; /* default = black */
  margin: 0 auto;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

/* Active stage */
.rail-stage.active .rail-dot {
  background-color: #c62828; /* red */
}

/* ---------- Metric (% ABOVE DOT) ---------- */

.rail-metric {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.25rem; /* ← this is the key */
  font-weight: 700;
  color: #333;
  white-space: nowrap;
}

/* ---------- State Label (RIGHT OF DOT) ---------- */

.rail-meta {
  position: absolute;
  top: -18px; /* slightly more vertical air */
  left: 50%;
  transform: translateX(100px);
  font-size: 0.95rem; /* ↑ from 0.75rem */
  font-weight: 500; /* new: gives authority without shouting */
  color: #555; /* slightly darker */
  white-space: nowrap;
  pointer-events: none;
}

/* ---------- Stage Label (BELOW DOT) ---------- */

.rail-label {
  margin-top: 10px;
  font-size: 0.8rem;
  white-space: normal;
}

/* ---------- Stage Buttons ---------- */

.price-progress-stages {
  display: flex;
  justify-content: space-between; /* keep column alignment */
  gap: 8px;
  margin-top: 12px;
}

.price-progress-stages button {
  flex: 0 0 auto; /* stop stretching */
  min-width: 150px; /* narrower, consistent width */
  margin: 0 auto; /* center in column */
  padding: 4px 12px; /* lighter visual weight */
}

/* ---------- Pricing Updates: Control Buttons ---------- */
#btnPriceReset,
#btnPriceBegin,
#btnPriceContinue,
#btnReturnToProducts,
#btnSuppPriceReset,
#btnSuppPriceBegin,
#btnSuppPriceContinue,
#btnReturnToSupplies {
  background-color: #00a8b5;
  color: #fff;
  border: 1px solid #0097a3;
  font-weight: 600;
  font-size: 0.95em;
  padding: 6px 16px;
}

#btnPriceBegin:hover,
#btnPriceContinue:hover,
#btnReturnToProducts:hover,
#btnSuppPriceBegin:hover,
#btnSuppPriceContinue:hover,
#btnReturnToSupplies:hover {
  background-color: #0097a3;
}

#btnPriceBegin:disabled,
#btnPriceContinue:disabled,
#btnReturnToProducts:disabled,
#btnSuppPriceBegin:disabled,
#btnSuppPriceContinue:disabled,
#btnReturnToSupplies:disabled {
  background-color: #cfeff2;
  border-color: #b6e3e8;
  color: #6b9ea3;
  cursor: not-allowed;
}

#btnPriceReset,
#btnSuppPriceReset {
  background-color: #e57373;
  border-color: #d32f2f;
  color: #fff;
}

#btnPriceReset:hover,
#btnSuppPriceReset:hover {
  background-color: #d32f2f;
}

/* =============================== */
/* Price Updates Table             */
/* =============================== */

.price-updates-table {
  margin-top: 24px;
}

/* ---------- Age Filter ---------- */

.price-updates-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.price-updates-filter label {
  font-size: 0.9rem;
}

.price-updates-filter input {
  width: 70px;
  padding: 2px 4px;
}

.filter-units {
  font-size: 0.85rem;
  color: #666;
}

/* ---------- Table ---------- */

.price-updates-table-wrap {
  overflow-x: auto;
}

/* Shared Price Updates tables (Products + Supplies) */

.price-updates-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.price-updates-table th,
.price-updates-table td {
  border: 1px solid #bbb;
  padding: 4px 6px;
  text-align: left;
  white-space: nowrap;
}

.price-updates-table thead th {
  background-color: #f0f0f0;
  font-weight: 600;
}

/* ---------- Row States ---------- */

.price-row-current {
  background-color: #eef6ff;
}

.price-row-selectable:hover {
  background-color: #f5faff;
  cursor: pointer;
}

.price-row-disabled {
  opacity: 0.6;
  cursor: default;
}

/* Price Updates – cursor row */
.price-update-cursor {
  background-color: #fff3cd; /* soft amber */
  outline: 2px solid #f0ad4e;
  outline-offset: -2px;
}

/* Optional: make it unmistakable */
.price-update-cursor td:first-child {
  font-weight: 600;
}

/* =============================== */
/* Price Updates Header            */
/* =============================== */
.price-updates-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-updates-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px; /* ← this is the key */
}

/* =============================== */
/* Price Updates – Active Product  */
/* =============================== */

.price-updates-active {
  border: 3px solid #999;
  padding: 14px 18px;
  margin: 16px 0;
}

.price-updates-active h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

/* ---------- Fields Row ---------- */

.price-updates-fields {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 16px; /* tighter vertical, comfortable horizontal */
  margin-bottom: 14px;
}

.price-updates-fields .field {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

/* Labels closer to values */
.price-updates-fields label {
  color: #666;
  font-size: 0.9rem; /* was 0.72rem */
  margin-bottom: 2px; /* tiny breathing room */
  line-height: 1.15;
}

/* Values */
.price-updates-fields span {
  font-size: 1.1rem; /* NEW */
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-updates-fields input {
  font-size: 1.1rem; /* match span values */
  font-weight: 500;
  padding: 4px 6px;
}

/* Emphasize prices */
.price-updates-fields .emphasis span {
  font-weight: 700;
}

/* Price change signaling */
.price-updates-fields .price-up {
  color: #b00020; /* muted red */
  font-weight: 700;
}

.price-updates-fields .price-down {
  color: #0b6e3f; /* muted green */
  font-weight: 700;
}

/* --- Price Updates: unified verification row --- */

.price-updates-actions {
  padding-top: 6px;
  margin-top: 6px;
  border-top: 1px solid #eee;
}

/* THIS is the critical rule */
.price-updates-action-row {
  display: flex !important; /* force it during diagnosis */
  align-items: center;
  gap: 12px;
}

/* Spacer pushes decision buttons to the right */
.action-spacer {
  flex: 1;
}

/* Checkbox label */
.inline-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
  color: #444;
  line-height: 1;
}

.inline-option input[type='checkbox'] {
  margin: 0;
}

.price-updates-action-row {
  display: flex;
  align-items: center;
  justify-content: center; /* KEY CHANGE */
  gap: 12px;
}

/* Buttons */
.price-updates-action-row button {
  min-width: 84px;
  padding: 4px 10px;
  line-height: 1.2;
}

.inline-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
  color: #444;
}

.inline-option input[type='checkbox'] {
  margin: 0;
  position: relative;
  top: -1px; /* THE FIX */
}
