.isp-bulk-page {
  width: 100%;
  max-width: 640px;
}

.isp-bulk-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* When preview is open, fill the viewport and scroll only inside the preview. */
body.isp-bulk-body:has(#ispBulkPreview:not([hidden])) {
  overflow: hidden;
}

body.isp-bulk-body:has(#ispBulkPreview:not([hidden])) .shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  padding-bottom: calc(16px + var(--safe-bottom));
  box-sizing: border-box;
}

body.isp-bulk-body:has(#ispBulkPreview:not([hidden])) .prod-page-header {
  flex-shrink: 0;
}

body.isp-bulk-body:has(#ispBulkPreview:not([hidden])) .isp-bulk-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

body.isp-bulk-body:has(#ispBulkPreview:not([hidden])) .isp-bulk-job-status {
  flex-shrink: 0;
}

body.isp-bulk-body:has(#ispBulkPreview:not([hidden])) .isp-bulk-form {
  flex: 1;
  min-height: 0;
}

body.isp-bulk-body:has(#ispBulkPreview:not([hidden])) .isp-bulk-file-field,
body.isp-bulk-body:has(#ispBulkPreview:not([hidden])) .isp-bulk-actions,
body.isp-bulk-body:has(#ispBulkPreview:not([hidden])) .form-feedback-error {
  flex-shrink: 0;
}

body.isp-bulk-body:has(#ispBulkPreview:not([hidden])) .isp-bulk-preview {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.isp-bulk-help {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 90, 0, 0.05);
}

.isp-bulk-help-title {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.isp-bulk-help-list {
  margin: 0;
  padding: 0 0 0 1.15rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.78);
}

.isp-bulk-help-list li + li {
  margin-top: 0.35rem;
}

.isp-bulk-help-list code {
  font-size: 0.84em;
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
}

.isp-bulk-file-field {
  margin-bottom: 0;
}

/* .locates-file-label sets display:inline-flex, which overrides the [hidden] UA rule. */
.isp-bulk-file-field .locates-file-label[hidden] {
  display: none !important;
}

.isp-bulk-file-field .locates-file-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.isp-bulk-file-field .locates-file-sub {
  font-size: 14px;
  margin-top: 2px;
}

.isp-bulk-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.locates-submit.is-loading .locates-btn-label {
  display: none;
}

.isp-bulk-job-status {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  font-size: 0.95rem;
  line-height: 1.4;
}

.isp-bulk-job-status.is-running {
  border-color: rgba(27, 122, 59, 0.35);
  background: rgba(27, 122, 59, 0.08);
  color: #1b7a3b;
}

.isp-bulk-job-status.is-done {
  border-color: rgba(27, 122, 59, 0.45);
  background: rgba(27, 122, 59, 0.12);
  color: #14632e;
}

.isp-bulk-job-status.is-failed {
  border-color: rgba(180, 35, 24, 0.35);
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
}

.isp-bulk-preview {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow: auto;
}

.isp-bulk-preview-meta {
  margin: 0 0 0.6rem;
}

.isp-bulk-preview-meta:last-child {
  margin-bottom: 0;
}

.isp-bulk-preview-meta strong {
  font-weight: 600;
}

.isp-bulk-preview-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.isp-bulk-preview-list > li {
  padding: 0.65rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.isp-bulk-preview-list > li:first-child {
  border-top: 0;
  padding-top: 0;
}

.isp-bulk-preview-list > li:last-child {
  padding-bottom: 0;
}

.isp-bulk-ok {
  color: #1b7a3b;
}

.isp-bulk-bad {
  color: #b42318;
}

.isp-bulk-subitems {
  margin: 0.35rem 0 0 1rem;
  padding: 0;
  list-style: disc;
}

.isp-bulk-subitems li {
  border: 0;
  padding: 0.12rem 0;
}
