.bulk-create-page[data-image-input-enabled="1"] .bulk-create-inputs {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.bulk-create-page[data-image-input-enabled="1"][data-slot-count="2"] .bulk-create-inputs {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.bulk-create-image-input {
  display: grid;
  min-width: 320px;
  grid-template-columns: auto minmax(80px, 180px) 40px 40px;
  align-items: center;
  gap: 8px;
}

.bulk-create-image-input > input[type="file"] { display: none !important; }
.bulk-create-image-input [hidden] { display: none !important; }

.bulk-create-image-input-name {
  overflow: hidden;
  color: #667085;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-create-image-input-button,
.bulk-create-image-icon-button {
  display: inline-flex;
  height: 56px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8ced3;
  background: #fff;
  color: #5d4b54;
  cursor: pointer;
}

.bulk-create-image-input-button {
  gap: 7px;
  padding: 0 15px;
  border-radius: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.bulk-create-image-icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.bulk-create-image-input-button:hover,
.bulk-create-image-icon-button:hover,
.bulk-create-image-icon-button[aria-expanded="true"] {
  border-color: #e85d9e;
  background: #fff4f8;
  color: #c93678;
}

.bulk-create-image-input-button:focus-visible,
.bulk-create-image-icon-button:focus-visible {
  outline: 2px solid #e85d9e;
  outline-offset: 2px;
}

.bulk-create-image-button-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.bulk-create-image-error {
  grid-column: 1 / -1;
  margin: 0;
  color: #b42318;
  font-size: 12px;
}

.bulk-create-image-error:empty { display: none; }

body.is-bulk-create-image-dialog-open { overflow: hidden; }

.bulk-create-image-dialog[hidden] { display: none !important; }

.bulk-create-image-dialog {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(28 22 25 / 62%);
}

.bulk-create-image-dialog-panel {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  overflow-x: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgb(34 20 28 / 28%);
}

.bulk-create-image-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px 14px;
  border-bottom: 1px solid #eee7eb;
}

.bulk-create-image-dialog-header > div { min-width: 0; }

.bulk-create-image-dialog-header h2 {
  margin: 0;
  color: #332a2f;
  font-size: 20px;
  line-height: 1.4;
}

.bulk-create-image-dialog-header p {
  max-width: 560px;
  overflow: hidden;
  margin: 4px 0 0;
  color: #7b6b73;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-create-image-dialog-close {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f8f3f6;
  color: #5d4b54;
  cursor: pointer;
}

.bulk-create-image-preview-stage {
  display: grid;
  min-width: 0;
  min-height: 240px;
  place-items: center;
  padding: 18px;
  background: #9c9c9c;
}

.bulk-create-image-source-box {
  position: relative;
  width: min(100%, 580px, calc(34vh * var(--bulk-create-image-source-ratio, 1.3333)));
  overflow: hidden;
  background: #777;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.bulk-create-image-source-box.is-dragging { cursor: grabbing; }

.bulk-create-image-source-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.bulk-create-image-selection-frame {
  position: absolute;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  border: 2px solid #5bb6ff;
  box-shadow: 0 0 0 999px rgb(36 31 32 / 42%);
  box-sizing: border-box;
  pointer-events: none;
}

.bulk-create-image-drag-hint {
  position: absolute;
  inset: 50% auto auto 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgb(35 29 32 / 78%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.bulk-create-image-drag-hint[hidden] { display: none !important; }

.bulk-create-image-dialog-controls {
  display: grid;
  gap: 14px;
  padding: 14px 22px;
}

.bulk-create-image-adjustment {
  display: grid;
  min-width: 0;
  gap: 9px;
  color: #41363c;
  font-size: 14px;
  font-weight: 700;
}

.bulk-create-image-adjustment > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bulk-create-image-adjustment output {
  color: #9b3565;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.bulk-create-image-adjustment input {
  width: 100%;
  margin: 0;
  accent-color: #d94388;
}

.bulk-create-image-position-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bulk-create-image-position-actions button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid #ddd2d8;
  border-radius: 9px;
  background: #fff;
  color: #6f5964;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bulk-create-image-position-actions button:hover,
.bulk-create-image-position-actions button[aria-expanded="true"] {
  border-color: #e85d9e;
  background: #fff3f8;
  color: #b92f6f;
}

.bulk-create-image-fine-toggle-icon {
  width: 18px;
  height: 18px;
}

.bulk-create-image-fine-controls[hidden] { display: none !important; }

.bulk-create-image-fine-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 14px;
  border-radius: 10px;
  background: #faf7f9;
}

.bulk-create-image-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px 16px;
}

.bulk-create-image-dialog-reset,
.bulk-create-image-dialog-done {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.bulk-create-image-dialog-reset {
  border: 1px solid #d8ced3;
  background: #fff;
  color: #6f5964;
}

.bulk-create-image-dialog-done {
  border: 1px solid #cf3f81;
  background: #cf3f81;
  color: #fff;
}

.bulk-create-image-dialog-close:hover,
.bulk-create-image-dialog-reset:hover { background: #fff3f8; }

.bulk-create-image-dialog-done:hover { background: #b92f6f; }

.bulk-create-image-dialog button:focus-visible,
.bulk-create-image-dialog input:focus-visible {
  outline: 2px solid #e85d9e;
  outline-offset: 2px;
}

@media (max-width: 820px) {
  .bulk-create-page[data-image-input-enabled="1"] .bulk-create-inputs,
  .bulk-create-page[data-image-input-enabled="1"][data-slot-count="2"] .bulk-create-inputs {
    grid-template-columns: 1fr;
  }

  .bulk-create-image-input {
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr) 40px 40px;
  }
}

@media (max-width: 520px) {
  .bulk-create-image-input {
    grid-template-columns: auto minmax(0, 1fr) 38px 38px;
  }

  .bulk-create-image-input-button { padding: 0 12px; }

  .bulk-create-image-dialog {
    align-items: end;
    padding: 10px;
  }

  .bulk-create-image-dialog-panel {
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }

  .bulk-create-image-dialog-header { padding: 16px; }
  .bulk-create-image-preview-stage { min-height: 220px; padding: 16px; }
  .bulk-create-image-dialog-controls {
    gap: 14px;
    padding: 18px 16px;
  }
  .bulk-create-image-fine-controls { grid-template-columns: 1fr; gap: 14px; }
  .bulk-create-image-position-actions button { flex: 1; }
  .bulk-create-image-drag-hint { max-width: calc(100% - 24px); font-size: 12px; white-space: nowrap; }
  .bulk-create-image-dialog-actions { padding: 0 16px 16px; }
  .bulk-create-image-dialog-reset,
  .bulk-create-image-dialog-done { flex: 1; padding: 0 12px; }
}
