/* Таблица промокодов */
#promocode-table thead th,
#promocode-table tbody td {
  text-align: left;
}

#promocode-table thead th:nth-child(4),
#promocode-table tbody td:nth-child(4),
#promocode-table thead th:nth-last-child(-n + 2),
#promocode-table tbody td:nth-last-child(-n + 2) {
  text-align: center;
}
#promo-edit-backdrop {
  font-size: 14px;
}
/* Верхняя панель: настройка реферала и кнопка */
.promocodes__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 100%;
}

.promocodes__referral {
  flex: 1 1 320px;
  max-width: 560px;
}

.promocodes__referral-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.promocodes__referral-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.promocodes__referral-input {
  width: 96px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #999;
  border-radius: 0;
  background: #fff;
  color: #333;
  font-size: 16px;
}

.promocodes__referral-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f6f6f6;
}

.promocodes__referral-save {
  height: 44px;
  padding: 0 16px;
  font-size: 16px !important;
  line-height: 44px !important;
}

.promocodes__referral-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #666;
  max-width: 460px;
}

.promocodes__referral-error {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: #b32222;
}

.promocodes__referral-error[hidden] {
  display: none;
}

/* Кнопка "Добавить промокод" */
.promocodes__top .promo-add-btn {
  flex: 0 0 auto;
  width: auto;
  height: 60px;
  padding: 0 10px;
}

/* Иконки в таблице */
.promo-icon-btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  width: 35px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Квадратик состояния промокода */
.promo-toggle-square {
  width: 35px;
  height: 35px;
  box-sizing: border-box;
  border: 1.46px solid #666666;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Активное состояние */
.promo-toggle-square--active {
  background: #38b236;
  border-color: #38b236;
}

/* Галочка внутри квадрата */
.promo-toggle-square__icon {
  display: none;
  width: 24px;
  height: 24px;
}

.promo-toggle-square--active .promo-toggle-square__icon {
  display: block;
}
.field {
  width: 100%;
  margin-bottom: 10px;
}
.field input {
  max-width: none;
}
.promo-conditions__hint {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.4;
}
.promo-conditions__hint--error {
  color: #b32222;
}
.promo-edit-error {
  color: #b32222;
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 8px;
}
.promo-edit-error[hidden] {
  display: none;
}
.field textarea {
  border: 1px solid #999;
  padding: 4px 38px 4px 10px;
  max-height: 60px;
  resize: none;
}

.promo-conditions__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 10px;
}
.promo-conditions__row label {
  max-width: 258px;
  margin-bottom: 0;
}
.btn.btn--success,
.btn.btn--danger {
  background: #161616;
  border: none;
}

.field--disabled {
  opacity: 0.5;
}