/*
 * TradeFlow v7.14.19 R11 final approved changes.
 * Additive presentation for the shared Xero/CSV preview and reinforced controls.
 */

.tf71426-overlay {
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 25, 20, .66);
}

.tf71426-dialog {
  position: relative;
  box-sizing: border-box;
  width: min(1180px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.tf71426-close {
  position: sticky;
  z-index: 3;
  top: 0;
  float: right;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #edf4f0;
  color: #17231e;
  font: 700 1.6rem/1 system-ui;
  cursor: pointer;
}

.tf71426-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tf71426-grid label,
.tf71426-jobs > label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.tf71426-grid input,
.tf71426-grid select {
  box-sizing: border-box;
  width: 100%;
}

.tf71426-grid input[readonly] {
  background: #f3f7f5;
}

.tf71426-jobs {
  display: grid;
  gap: 9px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #c8d7cf;
  border-radius: 12px;
}

.tf71426-jobs > label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  padding: 9px;
  border-radius: 9px;
  background: #f7faf8;
}

.tf71426-jobs small {
  display: block;
  margin-top: 3px;
  color: #66717f;
  font-weight: 500;
}

.tf71426-actions,
.tf71426-preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tf71426-preview-summary {
  margin: 18px 0 10px;
  padding: 12px;
  border-radius: 10px;
  background: #e9f7ef;
}

.tf71426-preview-summary span {
  padding-left: 10px;
  border-left: 1px solid #9bc7ad;
}

.tf71426-allocation,
.tf71426-job-preview {
  margin: 12px 0;
}

.tf71426-job-preview > summary {
  padding: 12px;
  cursor: pointer;
  background: #eef5ff;
}

.tf71426-confirm {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0;
  padding: 14px;
  border: 2px solid #126b4f;
  border-radius: 10px;
  background: #effaf5;
  font-weight: 800;
}

[data-tf71426-floating-deleted-actions="true"] {
  position: fixed !important;
  visibility: visible !important;
}

.tf713-group [data-tf71426-select-job-materials] {
  float: right;
  margin: -5px 0 -5px 12px;
}

.tf71426-material-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

@media (max-width: 720px) {
  .tf71426-overlay {
    align-items: end;
    padding: 0;
  }

  .tf71426-dialog {
    width: 100%;
    max-height: 96vh;
    padding: 18px 12px calc(18px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  .tf71426-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tf71426-actions .btn {
    flex: 1 1 100%;
  }

  .tf71426-preview-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .tf71426-preview-summary span {
    padding: 0;
    border: 0;
  }

  .tf713-group [data-tf71426-select-job-materials] {
    float: none;
    width: 100%;
    margin: 8px 0 0;
  }

  .tf71426-material-actions .btn {
    flex: 1 1 auto;
  }
}
