.cj-export-open {
  overflow: hidden;
}

.cj-export-layer {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 28px);
  background: rgba(16, 30, 48, .58);
  backdrop-filter: blur(5px);
}

.cj-export-dialog {
  width: min(1500px, 100%);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #cfe0ec;
  border-radius: 22px;
  background: #f8fbfd;
  box-shadow: 0 28px 80px rgba(12, 31, 49, .28);
  color: var(--text, #243044);
}

.cj-export-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 22px 14px;
  border-bottom: 1px solid #dce8f0;
  background: linear-gradient(120deg, #effaf4 0%, #f5fbff 54%, #fff8ef 100%);
}

.cj-export-header span,
.cj-export-section-title > span {
  color: #078744;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

.cj-export-header h2 {
  margin: 4px 0 2px;
  font-size: clamp(23px, 2vw, 30px);
}

.cj-export-header p,
.cj-export-section-title p,
.cj-export-context span,
.cj-export-field-option small {
  margin: 0;
  color: #687b91;
  font-size: 12px;
}

.cj-export-header > button {
  width: 42px;
  height: 42px;
  border: 1px solid #cbdbe6;
  border-radius: 12px;
  background: #fff;
  color: #25364b;
  font-size: 25px;
  cursor: pointer;
}

.cj-export-context {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px;
  border-bottom: 1px solid #e1eaf1;
  background: #fff;
}

.cj-export-context strong {
  color: #078744;
}

.cj-export-layout-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 9px 22px;
  border-bottom: 1px solid #e1eaf1;
  background: #f3f7fa;
}

.cj-export-layout-toolbar label,
.cj-export-form-grid label,
.cj-export-selected-row label {
  display: grid;
  gap: 5px;
  color: #52677e;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cj-export-layout-toolbar input,
.cj-export-layout-toolbar select,
.cj-export-form-grid input,
.cj-export-form-grid select,
.cj-export-selected-row input {
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cbdbe6;
  border-radius: 10px;
  background: #fff;
  color: #243044;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

.cj-export-layout-toolbar button,
.cj-export-footer button,
.cj-export-add-constant,
.cj-export-row-actions button,
.cj-export-field-actions button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #bed4e1;
  border-radius: 10px;
  background: #fff;
  color: #245171;
  font-weight: 800;
  cursor: pointer;
}

.cj-export-builder-grid {
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  display: grid;
  grid-template-columns: minmax(360px, .78fr) minmax(560px, 1.22fr);
  gap: 12px;
  padding: 12px 16px;
}

.cj-export-setup,
.cj-export-compose {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe6ee;
  border-radius: 14px;
  background: #fff;
}

.cj-export-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

.cj-export-section-title > span {
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  height: 31px;
  border-radius: 10px;
  background: #e6f7ee;
}

.cj-export-section-title h3 {
  margin: 0 0 2px;
  font-size: 16px;
}

.cj-export-section-title b {
  margin-left: auto;
  color: #078744;
  font-size: 12px;
}

.cj-export-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.cj-export-form-grid label small {
  color: #71859a;
  text-transform: none;
  letter-spacing: normal;
}

.cj-export-fields {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.cj-export-field-group {
  margin-bottom: 10px;
}

.cj-export-field-group h4 {
  margin: 0 0 6px;
  color: #36526d;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cj-export-field-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 9px;
  margin-bottom: 4px;
  border: 1px solid #e0e9ef;
  border-radius: 10px;
  cursor: pointer;
}

.cj-export-field-main {
  display: flex;
  flex: 1;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  cursor: pointer;
}

.cj-export-selected-fields {
  padding: 9px;
  border: 1px solid #cce8da;
  border-radius: 11px;
  background: #f7fcf9;
}

.cj-export-field-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.cj-export-field-actions button {
  min-width: 30px;
  min-height: 30px;
  padding: 3px;
}

.cj-export-field-option.selected {
  border-color: #9ed9bb;
  background: #f0fbf5;
}

.cj-export-field-option input {
  margin-top: 3px;
  accent-color: #0a9650;
}

.cj-export-field-option span {
  display: grid;
  gap: 2px;
}

.cj-export-field-option strong {
  font-size: 13px;
}

.cj-export-selected {
  display: grid;
  gap: 7px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.cj-export-selected-row {
  display: grid;
  grid-template-columns: 30px minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid #dfe9ef;
  border-radius: 11px;
  background: #f9fbfd;
}

.cj-export-selected-row.constant {
  grid-template-columns: 30px minmax(130px, 1fr) minmax(130px, 1fr) auto;
}

.cj-export-order {
  display: grid;
  place-items: center;
  height: 31px;
  border-radius: 9px;
  background: #e8f4fb;
  color: #1976d2;
  font-size: 12px;
  font-weight: 900;
}

.cj-export-selected-row input {
  min-height: 34px;
  padding: 6px 8px;
}

.cj-export-column-name input {
  border-color: transparent;
  background: transparent;
  font-weight: 850;
}

.cj-export-column-name input:hover,
.cj-export-column-name input:focus {
  border-color: #9fc5d9;
  background: #fff;
  outline: none;
}

.cj-export-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cj-export-row-actions {
  display: flex;
  gap: 4px;
}

.cj-export-row-actions button {
  min-width: 30px;
  min-height: 34px;
  padding: 4px;
}

.cj-export-row-actions button:last-child {
  color: #c7372f;
}

.cj-export-add-constant {
  width: 100%;
  margin-top: 9px;
  border-style: dashed;
  color: #078744;
}

.cj-export-format {
  margin-top: 10px;
  border: 1px solid #dce7ee;
  border-radius: 12px;
}

.cj-export-format summary {
  padding: 12px 14px;
  color: #264762;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.cj-export-form-grid.compact {
  padding: 0 13px 13px;
  margin: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cj-export-form-grid label.checkbox {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 42px;
  flex-direction: row;
  gap: 8px;
  padding: 8px;
  border: 1px solid #dce7ee;
  border-radius: 10px;
  text-transform: none;
  letter-spacing: normal;
}

.cj-export-form-grid label.checkbox input {
  min-height: auto;
  accent-color: #0a9650;
}

.cj-export-preview {
  margin-top: 10px;
  border: 1px solid #dce7ee;
  border-radius: 12px;
  overflow: hidden;
}

.cj-export-preview-placeholder {
  display: grid;
  gap: 4px;
  padding: 18px;
  text-align: center;
  color: #6b8095;
}

.cj-export-preview-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #eef8f3;
  color: #426079;
  font-size: 12px;
}

.cj-export-preview-meta strong {
  color: #078744;
}

.cj-export-preview-table {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.cj-export-preview-table table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.cj-export-preview-table th,
.cj-export-preview-table td {
  padding: 8px 10px;
  border-right: 1px solid #e4ebf0;
  border-bottom: 1px solid #e4ebf0;
  text-align: left;
  white-space: nowrap;
}

.cj-export-preview-table th {
  position: sticky;
  top: 0;
  background: #f0f5f8;
  color: #3c566d;
}

.cj-export-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 22px;
  border-top: 1px solid #dce7ee;
  background: #fff;
}

.cj-export-footer > span {
  color: #b03b2f;
  font-size: 12px;
  font-weight: 800;
}

.cj-export-footer > div {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.cj-export-footer button.primary {
  border-color: #078744;
  background: #078744;
  color: #fff;
  box-shadow: 0 8px 20px rgba(7, 135, 68, .2);
}

.cj-export-empty {
  padding: 16px;
  border: 1px dashed #cddbe4;
  border-radius: 10px;
  color: #71859a;
  text-align: center;
  font-size: 12px;
}

.rupture-export-button {
  align-self: end;
  min-height: 46px;
  padding: 10px 15px;
  border: 1px solid #078744;
  border-radius: 12px;
  background: #eefaf4;
  color: #078744;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 1050px) {
  .cj-export-builder-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .cj-export-layer {
    padding: 0;
    place-items: stretch;
  }

  .cj-export-dialog {
    width: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }

  .cj-export-header {
    padding: 17px 15px 14px;
  }

  .cj-export-header p {
    display: none;
  }

  .cj-export-context {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 9px 15px;
  }

  .cj-export-layout-toolbar {
    grid-template-columns: 1fr 1fr;
    padding: 10px 15px;
  }

  .cj-export-layout-toolbar label {
    grid-column: span 2;
  }

  .cj-export-builder-grid {
    padding: 10px;
  }

  .cj-export-setup,
  .cj-export-compose {
    padding: 13px;
  }

  .cj-export-form-grid,
  .cj-export-form-grid.compact {
    grid-template-columns: 1fr;
  }

  .cj-export-selected-row,
  .cj-export-selected-row.constant {
    grid-template-columns: 30px 1fr auto;
  }

  .cj-export-selected-row > .cj-export-column-name {
    grid-column: 2;
    grid-row: 1;
  }

  .cj-export-selected-row > .cj-export-column-value {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .cj-export-row-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .cj-export-preview-meta,
  .cj-export-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .cj-export-footer > div {
    width: 100%;
    margin: 0;
  }

  .cj-export-footer button {
    flex: 1;
  }
}
