/* Ciuchatek 3.87 — cennik kosztów zakupu w formularzu towaru. */
.online-add-modal.goods-form-compact .goods-purchase-compact-grid {
  display: grid !important;
  grid-template-columns: minmax(230px, 1.15fr) 110px 145px minmax(210px, 1fr) !important;
  align-items: end !important;
  gap: 9px 12px !important;
}

.purchase-cost-profile-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.purchase-cost-profile-field > small {
  color: var(--text-muted, #64748b);
  font-size: .75rem;
}

.purchase-cost-profile-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
  font-size: .8rem;
}

.purchase-cost-profile-label .cost-profile-gear {
  width: 30px;
  height: 30px;
  min-height: 30px;
  flex: 0 0 30px;
  padding: 0;
  border-color: #a8c7f3;
  background: #edf5ff;
  color: #0758d3;
  font-size: 16px;
}

.goods-purchase-compact-grid input[readonly] {
  background: #eef6ff;
  border-color: #9fc4f4;
  color: #174a85;
  font-weight: 850;
}

.cost-profile-editor-backdrop {
  z-index: 12000;
}

.cost-profile-editor-modal {
  width: min(760px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  overflow: auto;
}

.cost-profile-editor-list {
  display: grid;
  gap: 9px;
  margin: 14px 0 10px;
}

.cost-profile-editor-row {
  display: grid;
  grid-template-columns: 32px minmax(190px, 1fr) minmax(135px, .55fr) auto;
  align-items: end;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--border-color, #d8e3f0);
  border-radius: 12px;
  background: #f8fbff;
}

.cost-profile-editor-row label {
  min-width: 0;
}

.cost-profile-number {
  align-self: center;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
}

.cost-profile-delete {
  min-height: 36px;
  padding-inline: 12px;
}

.cost-profile-add-row {
  display: flex;
  justify-content: flex-start;
  padding-bottom: 8px;
}

:root[data-theme="dark"] .cost-profile-editor-row {
  border-color: #3f526a;
  background: #142033;
}

:root[data-theme="dark"] .goods-purchase-compact-grid input[readonly] {
  background: #142b48;
  border-color: #3b6ca8;
  color: #dbeafe;
}

@media (max-width: 1150px) {
  .online-add-modal.goods-form-compact .goods-purchase-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  .online-add-modal.goods-form-compact .goods-purchase-compact-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 650px) {
  .cost-profile-editor-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .cost-profile-editor-row label,
  .cost-profile-editor-row .cost-profile-delete {
    grid-column: 2;
  }
  .cost-profile-number {
    grid-row: 1;
  }
}
