.thit-root {
  --thit-accent: #d8292f;
  --thit-border: #dfe3e8;
  --thit-bg: #f7f8fa;
  margin: 0 0 1.25rem;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
  direction: ltr;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.thit-root[hidden],
.thit-root [hidden] {
  display: none !important;
}

.thit-toolbar,
.thit-prompt {
  display: flex;
  align-items: center;
  gap: .65rem;
  border: 1px solid var(--thit-border);
  border-radius: 8px;
  background: var(--thit-bg);
  padding: .7rem .8rem;
}

.thit-prompt {
  justify-content: space-between;
  margin-bottom: .55rem;
  border-inline-start: 4px solid var(--thit-accent);
}

.thit-prompt-question {
  min-width: 0;
  font-size: 18px !important;
  line-height: 1.4 !important;
  overflow-wrap: anywhere;
}

.thit-prompt-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex: 0 0 auto;
}

.thit-select,
.thit-root button {
  min-height: 38px;
  border: 1px solid #b8c0ca;
  border-radius: 5px;
  background: #fff;
  color: #20262e;
  font: inherit;
  font-size: 14px !important;
  line-height: 1.2;
}

.thit-select {
  min-width: 145px;
  padding: .45rem 2rem .45rem .65rem;
}

.thit-root button {
  cursor: pointer;
  padding: .48rem .75rem;
  font-weight: 650;
}

.thit-root button:hover,
.thit-root button:focus-visible {
  border-color: var(--thit-accent);
  color: var(--thit-accent);
}

.thit-root button:disabled,
.thit-select:disabled {
  cursor: wait;
  opacity: .58;
}

.thit-action,
.thit-prompt-accept {
  border-color: var(--thit-accent) !important;
  background: var(--thit-accent) !important;
  color: #fff !important;
}

.thit-globe {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--thit-accent);
  font-size: 0;
  flex: 0 0 auto;
}

.thit-globe::before,
.thit-globe::after {
  content: '';
  position: absolute;
  width: 13px;
  height: 23px;
  border: 1px solid currentColor;
  border-top: 0;
  border-bottom: 0;
  border-radius: 50%;
}

.thit-globe::after {
  width: 22px;
  height: 1px;
  border: 0;
  border-top: 1px solid currentColor;
  border-radius: 0;
}

.thit-status {
  color: #5a6572;
  font-size: .84rem;
}

.thit-status.is-error {
  color: #a41f25;
}

.thit-machine-notice {
  margin-top: .55rem;
  border-inline-start: 3px solid #9aa5b1;
  padding: .35rem .6rem;
  color: #616b76;
  font-size: .78rem;
  line-height: 1.45;
}

.thit-machine-notice a,
.thit-provider {
  color: inherit;
  white-space: nowrap;
}

.thit-provider::before {
  content: '· ';
}

.thit-article-content[dir="rtl"] {
  text-align: right;
}

.thit-root.is-loading .thit-globe {
  animation: thit-spin 1s linear infinite;
}

@keyframes thit-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .thit-toolbar,
  .thit-prompt,
  .thit-prompt-actions {
    flex-wrap: wrap;
  }

  .thit-prompt {
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
  }

  .thit-prompt-question {
    width: 100%;
    font-size: 16px !important;
    line-height: 1.4 !important;
  }

  .thit-prompt-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 8px;
  }

  .thit-prompt-actions button {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 10px;
    font-size: 14px !important;
    line-height: 1.25 !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .thit-select {
    min-width: 0;
    flex: 1 1 130px;
  }

  .thit-original {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thit-root.is-loading .thit-globe { animation: none; }
}
