/* Background size, aspect, cutline, shape, and generic button styles. */
.td-background-size-group {
  margin-bottom: 8px;
}

.td-background-size-group > .td-field:last-child,
.td-background-size-group > div > .td-field:last-child {
  margin-bottom: 0;
}

.td-background-summary-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.td-aspect-field {
  position: relative;
}

.td-field-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.td-field-heading-row label {
  margin-bottom: 0;
}

.td-field-current-value {
  color: #82787d;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.td-size-category-tabs {
  display: grid;
  grid-template-columns: 1fr .72fr 1.4fr 1fr;
  gap: 4px;
  margin-bottom: 8px;
  border-radius: 7px;
  background: #f2edef;
  padding: 3px;
}

.td-size-category-tab {
  min-width: 0;
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #6f666a;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  padding: 0 4px;
  white-space: nowrap;
}

.td-size-category-tab:hover,
.td-size-category-tab.is-active {
  background: #fff;
  color: #8f2e56;
  box-shadow: 0 1px 3px rgba(37, 31, 34, .08);
}

.td-aspect-select {
  position: relative;
}

.td-aspect-trigger,
.td-aspect-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border: 1px solid #d9d2ce;
  border-radius: 7px;
  background: #fff;
  color: #2f292b;
  cursor: pointer;
  padding: 8px;
  text-align: left;
}

.td-aspect-trigger {
  grid-template-columns: 28px minmax(0, 1fr) auto auto 18px;
}

.td-custom-ratio-trigger,
.td-custom-ratio-field .td-aspect-trigger {
  grid-template-columns: 28px minmax(0, 1fr) auto 18px;
}

.td-custom-ratio-field .td-aspect-option {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.td-aspect-trigger:hover,
.td-aspect-option:hover,
.td-aspect-option.is-active {
  border-color: #bd4a78;
  background: #fff7fb;
}

.td-aspect-caret {
  position: relative;
  width: 18px;
  height: 18px;
}

.td-aspect-caret::before {
  position: absolute;
  top: 5px;
  left: 4px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #6f666a;
  border-bottom: 2px solid #6f666a;
  content: "";
  transform: rotate(45deg);
}

.td-aspect-menu {
  position: absolute;
  z-index: 25;
  right: 0;
  left: 0;
  display: grid;
  gap: 6px;
  max-height: 224px;
  overflow: auto;
  margin-top: 6px;
  border: 1px solid #d8dce3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(37, 31, 34, .16);
  padding: 8px;
}

.td-aspect-menu .td-aspect-option {
  border-color: transparent;
}

.td-aspect-icon {
  display: block;
  justify-self: center;
  border: 2px solid currentColor;
  border-radius: 5px;
  color: #615b5e;
}

.td-aspect-icon-square {
  width: 18px;
  height: 18px;
}

.td-aspect-icon-portrait {
  width: 16px;
  height: 22px;
}

.td-aspect-icon-story {
  width: 12px;
  height: 24px;
}

.td-aspect-icon-landscape {
  width: 24px;
  height: 18px;
}

.td-aspect-icon-wide {
  width: 26px;
  height: 14px;
}

.td-aspect-icon-circle {
  width: 22px;
  height: 22px;
  border-radius: 999px;
}

.td-aspect-icon-custom {
  width: 22px;
  height: 18px;
  border-style: dashed;
}

.td-aspect-option-main {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.td-aspect-option-label {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-aspect-option-note {
  min-width: 0;
  overflow: hidden;
  color: #8b8387;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-aspect-option-ratio {
  color: #8b8387;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.td-aspect-option-size {
  display: grid;
  gap: 1px;
  justify-items: end;
  color: #6f666a;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.td-aspect-option-physical {
  color: #2f292b;
}

.td-aspect-option-pixels {
  color: #8b8387;
  font-size: 10px;
}

.td-cutline-control {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.td-cutline-control .td-switch-row {
  margin: 0;
}

.td-cutline-note {
  color: #8b8387;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
}

.td-cutline-color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.td-cutline-color-field label {
  margin: 0;
  color: #5f565b;
  font-size: 11px;
  font-weight: 900;
}

.td-custom-size-control {
  display: grid;
  gap: 10px;
}

.td-custom-ratio-field {
  margin-bottom: 0;
}

.td-size-preset-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.td-size-preset-button {
  display: grid;
  gap: 2px;
  min-height: 48px;
  border: 1px solid #d9d2ce;
  border-radius: 7px;
  background: #fff;
  color: #2f292b;
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
}

.td-size-preset-button:hover,
.td-size-preset-button.is-active {
  border-color: #bd4a78;
  background: #fff7fb;
}

.td-size-preset-label {
  font-size: 13px;
  font-weight: 900;
}

.td-size-preset-note {
  color: #8b8387;
  font-size: 11px;
  font-weight: 800;
}

.td-shape-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 48px);
  gap: 8px;
}

.td-shape-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid #d9d2ce;
  border-radius: 7px;
  background: #fff;
  color: #3a3336;
  cursor: pointer;
  padding: 0;
}

.td-shape-button:hover,
.td-shape-button.is-active {
  border-color: #bd4a78;
  background: #fff7fb;
  color: #8f2e56;
}

.td-shape-button:focus-visible {
  outline: 3px solid rgba(189, 74, 120, .24);
  outline-offset: 2px;
}

.td-shape-preview {
  display: block;
  width: 30px;
  height: 30px;
  background: currentColor;
}

.td-shape-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  padding: 0;
  white-space: nowrap;
}

.td-shape-preview-rect {
  border-radius: 2px;
}

.td-shape-preview-rounded {
  border-radius: 9px;
}

.td-shape-preview-circle {
  border-radius: 999px;
}

.td-shape-preview-heart {
  clip-path: polygon(50% 91%, 41% 82%, 26% 69%, 14% 55%, 8% 40%, 10% 25%, 18% 13%, 31% 8%, 42% 13%, 50% 22%, 58% 13%, 69% 8%, 82% 13%, 90% 25%, 92% 40%, 86% 55%, 74% 69%, 59% 82%);
}

.td-shape-preview-badge {
  -webkit-mask-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Cpath%20fill%3D%22%23000%22%20stroke%3D%22%23000%22%20stroke-width%3D%223%22%20stroke-linejoin%3D%22round%22%20d%3D%22M50%202%20L60%2013%20L74%208%20L77%2023%20L92%2026%20L87%2040%20L98%2050%20L87%2060%20L92%2074%20L77%2077%20L74%2092%20L60%2087%20L50%2098%20L40%2087%20L26%2092%20L23%2077%20L8%2074%20L13%2060%20L2%2050%20L13%2040%20L8%2026%20L23%2023%20L26%208%20L40%2013%20Z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Cpath%20fill%3D%22%23000%22%20stroke%3D%22%23000%22%20stroke-width%3D%223%22%20stroke-linejoin%3D%22round%22%20d%3D%22M50%202%20L60%2013%20L74%208%20L77%2023%20L92%2026%20L87%2040%20L98%2050%20L87%2060%20L92%2074%20L77%2077%20L74%2092%20L60%2087%20L50%2098%20L40%2087%20L26%2092%20L23%2077%20L8%2074%20L13%2060%20L2%2050%20L13%2040%20L8%2026%20L23%2023%20L26%208%20L40%2013%20Z%22%2F%3E%3C%2Fsvg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}



.td-button {
  min-height: 42px;
  border: 1px solid #d5cbc7;
  border-radius: 6px;
  background: #fff;
  color: #332d2f;
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 900;
}

.td-button:hover {
  background: #faf7f6;
}

.td-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.td-button-primary {
  border-color: #bd4a78;
  background: #bd4a78;
  color: #fff;
}

.td-button-primary:hover {
  background: #a93e69;
}
