.etp-tinthu-subscribe-captcha {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 22, 35, 0.45);
}

.etp-tinthu-subscribe-captcha[hidden] {
  display: none;
}

.etp-tinthu-subscribe-captcha__dialog {
  width: min(420px, 100%);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.etp-tinthu-subscribe-captcha__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e8edf2;
}

.etp-tinthu-subscribe-captcha__head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1a2b3c;
}

.etp-tinthu-subscribe-captcha__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5c6b7a;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.etp-tinthu-subscribe-captcha__close:hover {
  background: #f0f4f8;
}

.etp-tinthu-subscribe-captcha__body {
  padding: 16px;
}

.etp-tinthu-subscribe-captcha__hint {
  margin: 0 0 12px;
  color: #5c6b7a;
  font-size: 0.875rem;
  line-height: 1.45;
}

.etp-tinthu-subscribe-captcha__challenge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.etp-tinthu-subscribe-captcha__img {
  display: block;
  width: 180px;
  height: 56px;
  border: 1px solid #d8dee6;
  border-radius: 6px;
  background: #eef4fa;
}

.etp-tinthu-subscribe-captcha__refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #fff;
  color: var(--etp-primary, var(--thcs-primary, #0a4d8c));
  cursor: pointer;
}

.etp-tinthu-subscribe-captcha__refresh:hover {
  background: #f0f4f8;
}

.etp-tinthu-subscribe-captcha__refresh:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.etp-tinthu-subscribe-captcha__input {
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
}

.etp-tinthu-subscribe-captcha__input:focus {
  outline: none;
  border-color: var(--etp-primary, var(--thcs-primary, #0a4d8c));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--etp-primary, var(--thcs-primary, #0a4d8c)) 14%, transparent);
}

.etp-tinthu-subscribe-captcha__error {
  display: none;
  margin: 8px 0 0;
  color: #b42318;
  font-size: 0.8125rem;
}

.etp-tinthu-subscribe-captcha__error.is-visible {
  display: block;
}

.etp-tinthu-subscribe-captcha__actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}

.etp-tinthu-subscribe-captcha__submit {
  flex: 1 1 auto;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--etp-primary, var(--thcs-primary, #0a4d8c));
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.etp-tinthu-subscribe-captcha__submit:hover {
  filter: brightness(1.05);
}

.etp-tinthu-subscribe-captcha__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.etp-tinthu-subscribe-captcha__cancel {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #fff;
  color: #1a2b3c;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.etp-tinthu-subscribe-captcha__cancel:hover {
  background: #f7f9fc;
}

.etp-tinthu-subscribe-toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
}

.etp-tinthu-subscribe-toast {
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
  line-height: 1.4;
}

.etp-tinthu-subscribe-toast--success {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
}

.etp-tinthu-subscribe-toast--warning {
  background: #fffaeb;
  color: #b54708;
  border: 1px solid #fedf89;
}

.etp-tinthu-subscribe-toast--error {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
}

body.etp-tinthu-subscribe-open {
  overflow: hidden;
}
