.cp-otp-wrapper {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
}

/* кнопка-крестик */
.cp-otp-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ff8a00;
  background: transparent;
  cursor: pointer;
  padding: 0;
  outline: none;
}

.cp-otp-close::before,
.cp-otp-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  background-color: #ff8a00;
  transform-origin: center;
}

.cp-otp-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.cp-otp-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.cp-otp-close:hover {
  background: #ff8a00;
  border-color: #cccccc;
}

.cp-otp-close:hover::before,
.cp-otp-close:hover::after {
  background-color: #cccccc;
}

/* общий центр для шагов */
.cp-otp-step {
  text-align: center;
}

/* формы — столбиком, элементы одинаковой ширины */
.cp-otp-form-send,
.cp-otp-form-verify,
.cp-otp-form-name {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* поля ввода: базовый */
.cp-otp-input {
  width: 100%;
  padding: 10px 12px;
  margin: 6px 0 8px;
  box-sizing: border-box;
  font-size: 24px !important;
}

/* телефон */
.cp-otp-phone-wrapper {
  display: flex;
  align-items: center;
  font-size: 24px;
}

.cp-otp-phone-prefix {
  margin-right: 6px;
  font-size: 24px !important;
  line-height: 0;
  color: #eee;
  white-space: nowrap;
  padding-top: 6px;
}

.cp-otp-phone-input {
  flex: 1 1 auto;
  font-size: 24px !important;
}

/* код — крупный + центр */
.cp-otp-code-input {
  font-size: 20px !important;
  text-align: center;
}

/* стиль placeholder */
.cp-otp-phone-input::placeholder {
  color: #bbb;
  opacity: 1;
  font-size: 24px !important;
}

/* кнопка той же ширины, что и инпут */
.cp-otp-btn {
  width: 100%;
  padding: 10px 12px;
  margin-top: 8px;
  box-sizing: border-box;
}

/* чекбокс + текст согласия в одну строку, по ширине формы */
.cp-otp-consent {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 4px 0 8px;
  font-size: 14px !important;
  line-height: 1.3;
  text-align: left;
}

.cp-otp-consent-box {
  flex: 0 0 auto;
  margin-right: 6px;
  margin-top: 1px;
}

.cp-otp-consent-text {
  flex: 1 1 auto;
}

/* ссылка внутри текста – голубая */
.cp-otp-consent-text a {
  color: #007acc;
  text-decoration: underline;
}

/* PIN-код: 4 одинаковых “окошка” */
.cp-otp-pin-wrapper {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  margin: 10px 0 16px;
}

.cp-otp-pin-input {
  width: 2.5em;
  text-align: center;
  font-size: 24px !important;
  line-height: 1.3;
  padding: 8px 0;
  box-sizing: border-box;
  /* исходный вид */
  background-color: #f7f7f7;
  color: #000;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* disabled – фон тот же, но белые цифры */
.cp-otp-pin-input[disabled],
.cp-otp-pin-input:disabled {
  background-color: #0000005e;
  color: #fff;
  opacity: 1;
}

/* ===== ДОБАВКА, чтобы тема не ломала НИ ОДНО из 4-х окошек ===== */

/* перебиваем global input[type="tel"] только внутри нашего окна */
.cp-otp-wrapper .cp-otp-pin-wrapper .cp-otp-pin-input {
  max-width: none !important;
  /* width: 2.5em !important; */
  height: auto !important;
  padding: 8px 0 !important;
  box-sizing: border-box !important;

  background-color: #0000004 !important;
  color: #ffffff !important;
  border: 1px solid #dd8500 !important;
  border-radius: 4px !important;
}
/* Отключаем тему для disabled в наших инпутах PIN */
.cp-otp-wrapper .cp-otp-pin-input[disabled],
.cp-otp-wrapper .cp-otp-pin-input:disabled {
  opacity: 1 !important;
  cursor: text !important; /* или inherit, как удобнее */
}

/* ===== OTP UX: авто-проверка, ошибка ввода ===== */

/* Кнопку на шаге кода скрываем только после инициализации JS:
   без JS она остаётся fallback-кнопкой. */
.cp-otp-form-verify.cp-otp-autosubmit .cp-otp-btn {
  display: none !important;
}

/* Неверный код: красная подсветка 4 ячеек */
.cp-otp-wrapper .cp-otp-pin-wrapper .cp-otp-pin-input.cp-otp-error {
  border-color: #ff3b30 !important;
  background-color: rgba(255, 59, 48, 0.16) !important;
  color: #ff6b60 !important;
  box-shadow: 0 0 0 1px #ff3b30 inset !important;
}

/* Тряска блока PIN */
.cp-otp-pin-wrapper.cp-otp-shake {
  animation: cp-otp-shake 0.4s ease both;
}

@keyframes cp-otp-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .cp-otp-pin-wrapper.cp-otp-shake {
    animation: none;
  }
}

/* ===== Информационная шапка/подвал OTP-попапа (текущий стиль окна) ===== */
#cp-popup-33247 .cp-otp-ux-head {
    width: 100%;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(221, 153, 51, .32);
    color: #ddd0bf;
    box-sizing: border-box;
}
#cp-popup-33247 .cp-otp-ux-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}
#cp-popup-33247 .cp-otp-ux-row--bottom {
    align-items: flex-end;
    margin-top: 14px;
}
#cp-popup-33247 .cp-otp-ux-brand {
    font-size: 10px;
    line-height: 1;
    letter-spacing: 3.4px;
    color: #bda88f;
    white-space: nowrap;
}
#cp-popup-33247 .cp-otp-ux-brand b {
    color: #e33a2e;
    font-weight: 700;
}
#cp-popup-33247 .cp-otp-ux-x {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    padding: 0;
    border: 1px solid rgba(221, 153, 51, .7);
    border-radius: 50%;
    background: transparent;
    color: #e8ad61;
    font: 300 19px/29px inherit;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
}
#cp-popup-33247 .cp-otp-ux-x:hover {
    background: rgba(221, 153, 51, .12);
}
#cp-popup-33247 .cp-otp-ux-title {
    font-size: 25px;
    line-height: 1;
    letter-spacing: 4px;
    color: #f3e6d4;
    font-weight: 600;
}
#cp-popup-33247 .cp-otp-ux-meta {
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 1.5px;
    color: #a88d70;
    text-align: right;
    padding-bottom: 2px;
    white-space: nowrap;
}
#cp-popup-33247 .cp-otp-ux-foot {
    text-align: center;
    padding-top: 13px;
    border-top: 1px solid rgba(221, 153, 51, .18);
    margin-top: 2px;
}
#cp-popup-33247 .cp-otp-ux-phone {
    font-size: 11px;
    line-height: 1.35;
    color: #a89177;
    letter-spacing: .2px;
}
#cp-popup-33247 .cp-otp-ux-phone b {
    color: #d9b98d;
    font-weight: 500;
}
#cp-popup-33247 .cp-otp-ux-lead {
    margin-top: 7px;
    font-size: 15px;
    line-height: 1.25;
    color: #f0e3d2;
}
#cp-popup-33247 .cp-otp-ux-auto {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.3;
    color: #8f7b66;
}
#cp-popup-33247 .cp-otp-ux-resend-slot {
    margin-top: 12px;
    min-height: 30px;
}
#cp-popup-33247 .cp-otp-ux-resend-slot .cp-otp-timer,
#cp-popup-33247 .cp-otp-ux-resend-slot .cp-otp-resend-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid rgba(221, 153, 51, .32);
    border-radius: 999px;
    background: rgba(0, 0, 0, .12);
    color: #b49a7d;
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: .15px;
    text-decoration: none;
}
#cp-popup-33247 .cp-otp-ux-resend-slot .cp-otp-timer b {
    color: #e3a45a;
    font-weight: 400;
}
#cp-popup-33247 .cp-otp-ux-resend-slot .cp-otp-resend-btn {
    color: #e3a45a;
    cursor: pointer;
}
#cp-popup-33247 .cp-otp-ux-resend-slot .cp-otp-resend-btn:hover {
    background: rgba(221, 153, 51, .1);
}

/* ===== 0.9.13: телефонная кнопка, круглый крестик, крупнее resend ===== */
#cp-popup-33247 .cp-otp-form-send .cp-otp-btn {
    width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 11px 18px !important;
    border: 1px solid rgba(221, 153, 51, .55) !important;
    border-radius: 999px !important;
    background: rgba(0, 0, 0, .18) !important;
    color: #e7d2b7 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    letter-spacing: .3px !important;
    text-transform: none !important;
    box-shadow: none !important;
}
#cp-popup-33247 .cp-otp-form-send .cp-otp-btn:hover,
#cp-popup-33247 .cp-otp-form-send .cp-otp-btn:focus {
    background: rgba(221, 153, 51, .16) !important;
    border-color: rgba(221, 153, 51, .8) !important;
    color: #fff4e3 !important;
    box-shadow: none !important;
}

#cp-popup-33247 .cp-otp-ux-x {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    flex: 0 0 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 50% !important;
    font-family: inherit !important;
    font-size: 18px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
}

#cp-popup-33247 .cp-otp-ux-resend-slot {
    min-height: 36px !important;
}
#cp-popup-33247 .cp-otp-ux-resend-slot .cp-otp-timer,
#cp-popup-33247 .cp-otp-ux-resend-slot .cp-otp-resend-btn {
    min-height: 34px !important;
    padding: 9px 15px !important;
    border-color: rgba(221, 153, 51, .45) !important;
    background: rgba(0, 0, 0, .18) !important;
    color: #d8c0a0 !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
}
#cp-popup-33247 .cp-otp-ux-resend-slot .cp-otp-timer b {
    color: #f0b26a !important;
    font-size: 12px !important;
}

/* 0.9.14: телефонный шаг в том же тёмно-оранжевом стиле */
#cp-popup-33247 .cp-otp-phone-wrapper .cp-otp-input,
#cp-popup-33247 .cp-otp-phone-wrapper .cp-otp-phone-input {
    background: rgba(0, 0, 0, .24) !important;
    border: 1px solid rgba(221, 153, 51, .42) !important;
    border-radius: 4px !important;
    color: #e7d2b7 !important;
    box-shadow: none !important;
    font-size: 16px !important;
}
#cp-popup-33247 .cp-otp-phone-wrapper .cp-otp-input::placeholder,
#cp-popup-33247 .cp-otp-phone-wrapper .cp-otp-phone-input::placeholder {
    color: #9f8a72 !important;
}
#cp-popup-33247 .cp-otp-phone-prefix {
    color: #e7d2b7 !important;
}
#cp-popup-33247 .cp-otp-consent-text {
    color: #b9a58b !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
}
#cp-popup-33247 .cp-otp-consent-text a {
    color: #e3a45a !important;
    text-decoration-color: rgba(227, 164, 90, .5) !important;
}
#cp-popup-33247 .cp-otp-consent input[type="checkbox"] {
    accent-color: #dd9933 !important;
}

/* 0.9.15: крупная маска/ввод телефона, meta 12px */
#cp-popup-33247 .cp-otp-phone-wrapper {
    align-items: center !important;
}
#cp-popup-33247 .cp-otp-phone-prefix {
    font-size: 28px !important;
    line-height: 1.1 !important;
}
#cp-popup-33247 .cp-otp-phone-wrapper .cp-otp-input,
#cp-popup-33247 .cp-otp-phone-wrapper .cp-otp-phone-input {
    height: auto !important;
    min-height: 0 !important;
    padding: 8px 10px !important;
    font-size: 28px !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
}
#cp-popup-33247 .cp-otp-phone-wrapper .cp-otp-input::placeholder,
#cp-popup-33247 .cp-otp-phone-wrapper .cp-otp-phone-input::placeholder {
    font-size: 28px !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    opacity: 1 !important;
}
#cp-popup-33247 .cp-otp-ux-meta {
    font-size: 12px !important;
    letter-spacing: 1.2px !important;
}

/* 0.9.16: кнопка шага имени — как тёмная pill-кнопка на экране кода */
#cp-popup-33247 .cp-otp-step-name .cp-otp-btn {
    width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 11px 18px !important;
    border: 1px solid rgba(221, 153, 51, .55) !important;
    border-radius: 999px !important;
    background: rgba(0, 0, 0, .18) !important;
    color: #e7d2b7 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    letter-spacing: .3px !important;
    text-transform: none !important;
    box-shadow: none !important;
}
#cp-popup-33247 .cp-otp-step-name .cp-otp-btn:hover,
#cp-popup-33247 .cp-otp-step-name .cp-otp-btn:focus {
    background: rgba(221, 153, 51, .16) !important;
    border-color: rgba(221, 153, 51, .8) !important;
    color: #fff4e3 !important;
    box-shadow: none !important;
}
