.td-material-controls,
.td-svg-color-slots {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.td-media-size-controls {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.td-material-section-title {
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}

.td-material-segment {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  min-height: 36px;
  padding: 3px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #f6f7f9;
}

.td-material-segment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.td-material-segment-button:hover,
.td-material-segment-button:focus-visible {
  border-color: #c5ccd8;
  background: #ffffff;
}

.td-material-segment-button.is-active {
  border-color: #9aa7bb;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.td-svg-color-slot {
  display: block;
  overflow: hidden;
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  background: #fff;
}

.td-svg-color-slot-header {
  display: grid;
  grid-template-columns: 28px minmax(44px, 1fr) 32px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.td-svg-color-slot-header:hover,
.td-svg-color-slot-header:focus-visible {
  background: #f7f8fa;
}

.td-svg-color-slot-header:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

.td-svg-color-slot-swatch {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(15, 23, 42, .16);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}

.td-svg-color-slot-label {
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.td-svg-color-slot-chevron {
  justify-self: center;
  width: 8px;
  height: 8px;
  border-right: 2px solid #4f5665;
  border-bottom: 2px solid #4f5665;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s ease;
}

.td-svg-color-slot-header.is-open .td-svg-color-slot-chevron {
  transform: translateY(2px) rotate(225deg);
}

.td-svg-color-slot-palette {
  margin: 0 8px 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}
