.toolisto-text-cleaner,
.toolisto-text-cleaner * {
  box-sizing: border-box;
}

.toolisto-text-cleaner {
  --toolisto-tc-primary: #5b5cf0;
  --toolisto-tc-primary-dark: #4748d4;
  --toolisto-tc-primary-soft: #f0f0ff;
  --toolisto-tc-border: #e4e7ec;
  --toolisto-tc-text: #172033;
  --toolisto-tc-muted: #667085;
  width: min(var(--theme-block-width, 100%), var(--theme-block-max-width, 100%));
  max-width: var(--theme-block-max-width, 1120px);
  min-width: 0;
  margin: 24px auto;
  color: var(--toolisto-tc-text);
  font-family: inherit;
  container-name: toolisto-cleaner;
  container-type: inline-size;
}

.toolisto-tc__workspace {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 16px;
}

.toolisto-tc__editor,
.toolisto-tc__options {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: clamp(18px, 3vw, 26px);
  background: #ffffff;
  border: 1px solid var(--toolisto-tc-border);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.07);
}

.toolisto-tc__options {
  padding: 22px;
}

.toolisto-tc__heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.toolisto-text-cleaner .toolisto-tc__label,
.toolisto-text-cleaner .toolisto-tc__options-title {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--toolisto-tc-text);
  font: inherit;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.4;
}

.toolisto-text-cleaner .toolisto-tc__options-title {
  margin-bottom: 12px;
}

.toolisto-tc__count {
  flex: 0 0 auto;
  color: var(--toolisto-tc-muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.toolisto-tc__count strong {
  color: #344054;
  font-weight: 700;
}

.toolisto-text-cleaner .toolisto-tc__textarea {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 360px;
  margin: 0;
  padding: 16px;
  resize: vertical;
  color: var(--toolisto-tc-text);
  background: #fbfcfe;
  border: 2px solid #d9ddea;
  border-radius: 13px;
  outline: none;
  box-shadow: none;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: normal;
  text-transform: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.toolisto-text-cleaner .toolisto-tc__textarea::placeholder {
  color: #98a2b3;
  opacity: 1;
}

.toolisto-text-cleaner .toolisto-tc__textarea:focus {
  background: #ffffff;
  border-color: var(--toolisto-tc-primary);
  box-shadow: 0 0 0 4px rgba(91, 92, 240, 0.12);
}

.toolisto-tc__editor--output .toolisto-tc__textarea {
  background: #f8f9ff;
}

.toolisto-tc__options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.toolisto-text-cleaner .toolisto-tc__option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 11px;
  color: var(--toolisto-tc-text);
  background: #fafbfc;
  border: 1px solid var(--toolisto-tc-border);
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.toolisto-text-cleaner .toolisto-tc__option:hover {
  background: #f7f7ff;
  border-color: #c9c9fb;
}

.toolisto-text-cleaner .toolisto-tc__option:has(input:checked) {
  background: var(--toolisto-tc-primary-soft);
  border-color: #c9c9fb;
}

.toolisto-text-cleaner .toolisto-tc__option input[type="checkbox"] {
  display: block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--toolisto-tc-primary);
}

.toolisto-tc__option span,
.toolisto-tc__option strong,
.toolisto-tc__option small {
  display: block;
  min-width: 0;
}

.toolisto-tc__option strong {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.toolisto-tc__option small {
  margin-top: 2px;
  color: var(--toolisto-tc-muted);
  font-size: 11px;
  line-height: 1.4;
}

.toolisto-tc__preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.toolisto-tc__preset-row > span {
  width: 100%;
  color: var(--toolisto-tc-muted);
  font-size: 12px;
  font-weight: 650;
}

.toolisto-text-cleaner .toolisto-tc__preset-row button,
.toolisto-text-cleaner .toolisto-tc__clean,
.toolisto-text-cleaner .toolisto-tc__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  color: #475467;
  background: #f2f4f7;
  border: 1px solid transparent;
  border-radius: 9px;
  box-shadow: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.toolisto-text-cleaner .toolisto-tc__preset-row button:hover,
.toolisto-text-cleaner .toolisto-tc__preset-row button:focus-visible {
  color: var(--toolisto-tc-primary-dark);
  background: var(--toolisto-tc-primary-soft);
  border-color: #c9c9fb;
}

.toolisto-text-cleaner .toolisto-tc__clean {
  gap: 8px;
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  color: #ffffff;
  background: var(--toolisto-tc-primary);
  border-radius: 11px;
  box-shadow: 0 8px 18px rgba(91, 92, 240, 0.2);
  font-size: 15px;
}

.toolisto-text-cleaner .toolisto-tc__clean:hover,
.toolisto-text-cleaner .toolisto-tc__clean:focus-visible,
.toolisto-text-cleaner .toolisto-tc__action--primary:hover,
.toolisto-text-cleaner .toolisto-tc__action--primary:focus-visible {
  color: #ffffff;
  background: var(--toolisto-tc-primary-dark);
}

.toolisto-text-cleaner button:active {
  transform: scale(0.98);
}

.toolisto-text-cleaner button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.toolisto-tc__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.toolisto-tc__summary > div {
  min-width: 0;
  padding: 10px 7px;
  background: #f8f9fb;
  border: 1px solid #edf0f4;
  border-radius: 9px;
  text-align: center;
}

.toolisto-tc__summary strong,
.toolisto-tc__summary span {
  display: block;
}

.toolisto-tc__summary strong {
  color: var(--toolisto-tc-primary-dark);
  font-size: 18px;
  line-height: 1.2;
}

.toolisto-tc__summary span {
  margin-top: 3px;
  color: var(--toolisto-tc-muted);
  font-size: 10px;
  line-height: 1.3;
}

.toolisto-tc__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.toolisto-text-cleaner .toolisto-tc__action {
  gap: 7px;
  width: 100%;
  min-height: 42px;
  font-size: 12px;
}

.toolisto-text-cleaner .toolisto-tc__action--primary {
  color: #ffffff;
  background: var(--toolisto-tc-primary);
}

.toolisto-text-cleaner .toolisto-tc__action--clear:hover,
.toolisto-text-cleaner .toolisto-tc__action--clear:focus-visible {
  color: #b42318;
  background: #fee4e2;
}

.toolisto-text-cleaner button svg,
.toolisto-tc__privacy svg {
  display: block;
  flex: 0 0 auto;
  max-width: none;
}

.toolisto-tc__status {
  min-height: 20px;
  margin: 10px 4px 0;
  color: var(--toolisto-tc-primary-dark);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.toolisto-tc__privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 5px 0 0;
  padding: 0 12px;
  color: var(--toolisto-tc-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.toolisto-tc__privacy svg {
  color: #12a56f;
}

@container toolisto-cleaner (min-width: 981px) {
  .toolisto-tc__workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.68fr) minmax(0, 1fr);
  }

  .toolisto-tc__editor,
  .toolisto-tc__options {
    width: auto;
  }

  .toolisto-tc__options-grid {
    grid-template-columns: 1fr;
  }

  .toolisto-tc__preset-row > span {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .toolisto-text-cleaner {
    margin: 18px auto;
  }

  .toolisto-tc__workspace {
    display: flex;
    flex-direction: column;
  }

  .toolisto-tc__editor,
  .toolisto-tc__options {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
  }

  .toolisto-tc__options {
    order: 2;
  }

  .toolisto-tc__editor--output {
    order: 3;
  }

  .toolisto-text-cleaner .toolisto-tc__textarea {
    min-height: 250px;
    padding: 14px;
  }

  .toolisto-tc__options-grid {
    grid-template-columns: 1fr;
  }

  .toolisto-tc__heading-row {
    display: block;
  }

  .toolisto-tc__count {
    display: block;
    margin-top: 4px;
    white-space: normal;
  }

  .toolisto-tc__privacy {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 410px) {
  .toolisto-tc__actions,
  .toolisto-tc__summary {
    grid-template-columns: 1fr;
  }
}

@container toolisto-cleaner (max-width: 680px) {
  .toolisto-text-cleaner {
    margin: 18px auto;
  }

  .toolisto-tc__editor,
  .toolisto-tc__options {
    padding: 18px;
    border-radius: 16px;
  }

  .toolisto-text-cleaner .toolisto-tc__textarea {
    min-height: 250px;
    padding: 14px;
  }

  .toolisto-tc__options-grid {
    grid-template-columns: 1fr;
  }

  .toolisto-tc__heading-row {
    display: block;
  }

  .toolisto-tc__count {
    display: block;
    margin-top: 4px;
    white-space: normal;
  }

  .toolisto-tc__privacy {
    align-items: flex-start;
    text-align: left;
  }
}

@container toolisto-cleaner (max-width: 410px) {
  .toolisto-tc__actions,
  .toolisto-tc__summary {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toolisto-text-cleaner * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
