.bulk-create-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  align-items: start;
  gap: 8px;
}

.bulk-create-input-row > .bulk-create-input-control {
  min-width: 0;
}

.bulk-create-appearance-button {
  position: relative;
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #d8ced3;
  border-radius: 10px;
  background: #fff;
  color: #5d4b54;
  cursor: pointer;
}

.bulk-create-appearance-button:hover,
.bulk-create-appearance-button[aria-expanded="true"] {
  border-color: var(--bulk-create-accent);
  background: #fff4f8;
  color: var(--bulk-create-accent-dark);
}

.bulk-create-appearance-button:focus-visible,
.bulk-create-appearance-close:focus-visible,
.bulk-create-appearance-tab:focus-visible,
.bulk-create-appearance-reset:focus-visible,
.bulk-create-appearance-detail .td-font-picker-trigger:focus-visible {
  outline: 2px solid var(--bulk-create-accent);
  outline-offset: 2px;
}

.bulk-create-appearance-button:disabled {
  cursor: wait;
  opacity: .48;
}

.bulk-create-appearance-button.is-adjusted::after {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--bulk-create-accent);
  content: "";
}

.bulk-create-appearance-button-icon {
  width: 24px;
  height: 24px;
}

.bulk-create-appearance-panel[hidden] {
  display: none;
}

.bulk-create-appearance-panel {
  width: 100%;
  margin-top: 10px;
  overflow: visible;
  border: 1px solid #e4dbe0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(48 30 39 / 8%);
  animation: bulk-create-appearance-open .18s ease-out;
}

.bulk-create-appearance-panel-inner {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.bulk-create-appearance-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: #3b3036;
  font-size: 16px;
}

.bulk-create-appearance-panel-heading {
  display: flex;
  min-width: 0;
}

.bulk-create-appearance-close {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f6f1f3;
  color: #554950;
  cursor: pointer;
  font-size: 22px;
}

.bulk-create-appearance-reset {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid #d8ced3;
  border-radius: 9px;
  background: #fff;
  color: var(--bulk-create-accent-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.bulk-create-appearance-reset:hover {
  border-color: #c9a7b7;
  background: #fff1f6;
}

.bulk-create-appearance-reset-icon {
  font-size: 18px;
}

.bulk-create-appearance-toolbar {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
}

.bulk-create-appearance-tabs {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 7px;
  padding: 2px;
  scrollbar-width: thin;
}

.bulk-create-appearance-tab {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid #d8ced3;
  border-radius: 9px;
  background: #fff;
  color: #51464c;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.bulk-create-appearance-tab:hover {
  border-color: #c9a7b7;
  background: #fff8fb;
}

.bulk-create-appearance-tab.is-active {
  border-color: var(--bulk-create-accent);
  background: #fff1f6;
  color: var(--bulk-create-accent-dark);
}

.bulk-create-appearance-tab-icon {
  font-size: 19px;
}

.bulk-create-appearance-detail {
  padding: 12px 14px;
  border-radius: 10px;
  background: #faf7f8;
}

.bulk-create-appearance-mixed-note {
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f1eaed;
  color: #675b61;
  font-size: 12px;
  line-height: 1.6;
}

.bulk-create-appearance-range {
  display: grid;
  gap: 8px;
  color: #3b3036;
  font-size: 13px;
  font-weight: 800;
}

.bulk-create-appearance-font-picker {
  width: min(100%, 720px);
}

body.is-bulk-create-appearance-open .bulk-create-controls {
  position: relative;
  z-index: 40;
  clip-path: none;
  box-shadow: none;
}

body.is-bulk-create-appearance-open .bulk-create-controls::before {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  background: var(--bulk-create-surface);
  content: "";
  transform: translateX(-50%);
}

.bulk-create-appearance-detail .td-fill-picker {
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.bulk-create-appearance-detail .td-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, 48px);
  align-items: center;
  justify-content: start;
  gap: 12px;
  width: 100%;
  padding: 2px;
}

.bulk-create-appearance-detail .td-swatch,
.bulk-create-appearance-detail .td-color-plus-button {
  width: 48px;
  height: 48px;
}

.bulk-create-appearance-detail .td-swatch {
  overflow: hidden;
  border: 1px solid rgb(45 39 42 / 12%);
  border-radius: 50%;
  background-clip: padding-box;
  box-shadow: none;
  cursor: pointer;
  text-indent: -999px;
}

.bulk-create-appearance-detail .td-swatch.is-light {
  border-color: #d8dce3;
}

.bulk-create-appearance-detail .td-swatch.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 3px #3b82f6;
}

.bulk-create-appearance-detail .td-swatch > span {
  display: none;
}

.bulk-create-appearance-line-style {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ebe4e7;
}

.bulk-create-appearance-line-style-label {
  color: #5f5359;
  font-size: 13px;
  font-weight: 800;
}

.bulk-create-appearance-line-style-options {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #d8ced3;
  border-radius: 9px;
}

.bulk-create-appearance-line-style-button {
  min-width: 72px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid #d8ced3;
  background: #fff;
  color: #51464c;
  cursor: pointer;
  font-weight: 700;
}

.bulk-create-appearance-line-style-button:last-child {
  border-right: 0;
}

.bulk-create-appearance-line-style-button.is-active {
  background: #fff1f6;
  color: var(--bulk-create-accent-dark);
}

@keyframes bulk-create-appearance-open {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .bulk-create-input-row {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 6px;
  }

  .bulk-create-appearance-button {
    width: 48px;
    height: 56px;
  }

  .bulk-create-appearance-panel-inner {
    padding: 12px;
  }

  .bulk-create-appearance-detail {
    padding: 12px;
  }

  .bulk-create-appearance-tab {
    flex: 0 0 auto;
    justify-content: center;
  }

  .bulk-create-appearance-reset {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .bulk-create-appearance-reset > span:last-child {
    display: none;
  }

  .bulk-create-appearance-detail .td-swatches {
    grid-template-columns: repeat(7, 38px);
    gap: 6px;
  }

  .bulk-create-appearance-detail .td-swatch,
  .bulk-create-appearance-detail .td-color-plus-button {
    width: 38px;
    height: 38px;
  }
}
