/* Meatbot Site | Build v0.9.8R.12 */
/* Auth Modal Styles */

/* SVG Eye Icons */
.eye-icon {
  width: 20px;
  height: 20px;
  stroke: #6b7280;
  stroke-width: 2;
  fill: none;
  transition: stroke-color 0.2s ease;
}

.eye-icon:hover {
  stroke: #374151;
}

/* Modal Overlay and Container */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20000; /* Поверх любых выпадающих меню */
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease, display 0.3s ease;
}

.auth-modal.auth-modal--active {
  display: flex;
  opacity: 1;
}

/* Плавное исчезновение при закрытии */
.auth-modal.auth-modal--closing {
  opacity: 0;
}

.auth-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 20001;
}

.auth-modal__container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateX(100%);
  width: 1200px;
  height: 800px;
  max-width: 95vw;
  max-height: 95vh;
  background: #EFEFEF;
  border-radius: 0;
  overflow: hidden;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  z-index: 20002;
}

/* Opening animation - slide from right to center */
.auth-modal.auth-modal--active .auth-modal__container {
  transform: translate(-50%, -50%) translateX(0);
}

/* Closing animation - slide to left */
.auth-modal.auth-modal--closing .auth-modal__container {
  transform: translate(-50%, -50%) translateX(-100%);
}

/* Screens Container */
.auth-modal__screens {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.auth-modal__screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.auth-modal__screen--active {
  transform: translateX(0);
}

.auth-modal__screen--prev {
  transform: translateX(-100%);
}

/* Close Button */
.auth-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
}

.auth-modal__close img {
  width: 20px;
  height: 20px;
}

/* Auth Content */
.auth-modal__content {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Left Side - Background Image */
.auth-modal__left {
  position: relative;
  width: 50%;
  height: 100%;
  background: url('../assets/images/bg_auth.jpg') center/cover no-repeat;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 84px;
  flex-shrink: 0; /* Prevent shrinking */
}

/* Ensure base styles are always applied, even with modifiers */
.auth-modal__left:not(.auth-modal__left--registration):not(.auth-modal__left--payment):not(.auth-modal__left--plan-details):not(.auth-modal__left--recovery) {
  background: url('../assets/images/bg_auth.jpg') center/cover no-repeat;
  flex-direction: row;
  align-items: flex-start;
  padding-top: 84px;
}

.auth-modal__logo {
  width: 133px;
  height: 26px;
  background: url('../assets/images/logo_horizontal_footer.png') center/contain no-repeat;
}

/* Recovery Screen - Different Background */
.auth-modal__left--recovery {
  background: url('../assets/images/bg_password_recovery.jpg') center/cover no-repeat;
}

/* Registration Screen - Light Background */
.auth-modal__left--registration {
  background: #FAF6F6;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  /* Наследуем ширину от базового класса - не переопределяем */
}

/* Payment Screen - Same as registration but for payment */
.auth-modal__left--payment {
  background: #FAF6F6;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  /* Наследуем ширину от базового класса - не переопределяем */
}

/* Plan Details Screen - Same width as registration */
.auth-modal__left--plan-details {
  background: #FAF6F6;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
}

/* ===== ПОЛНАЯ ПЕРЕЗАПИСЬ СТИЛЕЙ ТАРИФОВ ===== */

/* КОНТЕЙНЕР ТАРИФОВ - ДЕСКТОП */
.auth-modal__pricing {
  width: 100%;
  max-width: 535px;
  margin-top: 40px;
  padding: 0 67px;
  box-sizing: border-box;
}

.auth-modal__pricing-title {
  font-family: 'Ubuntu Sans Mono', monospace;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.087;
  color: rgba(0, 0, 0, 0.9);
  text-align: center;
  margin-bottom: 40px;
  max-width: 491px;
}

/* КАРТОЧКИ ТАРИФОВ - ДЕСКТОП */
.auth-modal__pricing-cards {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.auth-modal__pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 35px;
  background: #FFFFFF;
  border: 1px solid #CDCDCD;
  border-radius: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  width: 468px;
  box-sizing: border-box;
  height: 160px;
}

.auth-modal__pricing-card:hover {
  border-color: #FB2C36;
  box-shadow: 0 4px 12px rgba(251, 44, 54, 0.15);
}

.auth-modal__pricing-card--selected {
  border-color: #FB2C36;
  background: #FFF5F5;
  box-shadow: 0 4px 12px rgba(251, 44, 54, 0.2);
}

/* ЭЛЕМЕНТЫ ТАРИФОВ - ДЕСКТОП */
.auth-modal__pricing-icon {
  position: absolute;
  left: 35px;
  top: 50%;
  transform: translateY(-50%);
  width: 61px;
  height: 104px;
  flex-shrink: 0;
}

.auth-modal__pricing-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-modal__pricing-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: 136px;
  width: calc(100% - 136px);
  height: 100%;
}

.auth-modal__pricing-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.auth-modal__pricing-name {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.087;
  color: #181818;
  margin: 0 0 4px 0;
  text-align: left;
}

.auth-modal__pricing-desc {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.087;
  color: #000000;
  margin: 0;
  text-align: left;
  max-width: 127px;
}

.auth-modal__pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  text-align: center;
}

.auth-modal__pricing-currency {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.087;
  color: #000000;
}

.auth-modal__pricing-amount {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 800;
  font-size: 64px;
  line-height: 1.087;
  color: #000000;
}

.auth-modal__pricing-period {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.087;
  color: #000000;
}

/* Registration Form Disabled State */
.auth-modal__form--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.auth-modal__submit-btn--disabled {
  background: #BEBEBE !important;
}

.auth-modal__submit-btn--disabled::before {
  background: #898989 !important;
}

.auth-modal__submit-btn--disabled::after {
  background: #BEBEBE !important;
}

/* Plan Selection Notice */
.auth-modal__plan-notice {
  margin-top: 16px;
  text-align: right;
}

.auth-modal__plan-notice-text {
  font-family: 'Ubuntu Mono', monospace;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.087;
  color: #949494;
  margin: 0;
}

/* Step Indicator */
.auth-modal__step-indicator {
  margin-bottom: 20px;
}

.auth-modal__step-text {
  font-family: 'Ubuntu Mono', monospace;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.087;
  color: #504C4C;
  margin: 0;
}

/* Plan Details View */
.auth-modal__plan-details {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 67px 0 67px;
  background: #FAF6F6;
  box-sizing: border-box;
  max-width: 535px;
  margin: 0 auto;
}

.auth-modal__plan-details--active {
  display: flex;
}

/* Selected Plan Card */
.auth-modal__selected-plan {
  position: relative;
  width: 421px; /* 468px - 10% = 421px */
  height: 317px; /* 352px - 10% = 317px */
  background: url('../assets/images/bg_plan_selected.jpg') center/cover no-repeat, #FFFFFF;
  border: 1px solid #EE3838;
  border-radius: 44px; /* 49px - 10% = 44px */
  margin-top: 20px;
  display: flex;
  align-items: center;
  padding: 0;
}

.auth-modal__selected-plan-icon {
  position: absolute;
  left: 29px; /* 32px - 10% = 29px */
  top: 33px; /* 37px - 10% = 33px */
  width: 133px; /* 148px - 10% = 133px */
  height: 225px; /* 250px - 10% = 225px */
  flex-shrink: 0;
}

.auth-modal__selected-plan-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-modal__selected-plan-content {
  margin-left: 204px; /* 227px - 10% = 204px */
  width: 192px; /* 213px - 10% = 192px */
  text-align: center;
  padding-top: 59px; /* 66px - 10% = 59px */
}

.auth-modal__selected-plan-name {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.087;
  color: #000000;
  margin: 0 0 7px 0;
}

.auth-modal__selected-plan-desc {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.087;
  color: #000000;
  margin: 0 0 20px 0;
}

.auth-modal__selected-plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 20px;
}

.auth-modal__selected-plan-currency {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.087;
  color: #000000;
}

.auth-modal__selected-plan-amount {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 800;
  font-size: 64px;
  line-height: 1.087;
  color: #000000;
}

.auth-modal__selected-plan-period {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.087;
  color: #000000;
}

/* Your Choice Badge */
.auth-modal__choice-badge {
  position: absolute;
  bottom: 11px; /* 12px - 10% = 11px */
  left: 153px; /* 170px - 10% = 153px */
  width: 115px; /* 128px - 10% = 115px */
  height: 22px; /* 24px - 10% = 22px */
  background: #EE3838;
  border-radius: 32px; /* 36px - 10% = 32px */
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 600;
  font-size: 13px; /* 14px - 10% = 13px */
  line-height: 1.087;
  color: #FFFFFF;
}

/* Plan Features */
.auth-modal__plan-features {
  width: 421px; /* 468px - 10% = 421px */
  margin-top: 27px; /* 30px - 10% = 27px */
  display: flex;
  justify-content: space-between;
}

.auth-modal__features-column {
  flex: 1;
}

.auth-modal__features-title {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.087;
  color: #797979;
  margin: 0 0 16px 0;
}

.auth-modal__features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auth-modal__feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.087;
  color: #000000;
}

.auth-modal__feature-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-modal__feature-icon--check {
  color: #00C950;
}

.auth-modal__feature-icon--cross {
  color: #FB2C36;
}

/* Back to Plans Link */
.auth-modal__back-to-plans {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Ubuntu Mono', monospace;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.087;
  color: #504C4C;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-modal__back-to-plans:hover {
  color: #000;
}

.auth-modal__back-to-plans::before {
  content: "←";
  font-size: 16px;
  font-weight: 400;
}

/* Right Side - Login Form */
.auth-modal__right {
  width: 50%;
  padding: 40px 40px 40px 40px;
  display: flex;
  flex-direction: column;
  background: #EFEFEF;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  justify-content: flex-start;
}

/* Header */
.auth-modal__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 30px;
  position: relative;
  height: 59px;
  padding-right: 90px; /* reserve space under the close button */
}

.auth-modal__title {
  position: absolute;
  left: 0;
  right: 180px; /* More space for buttons */
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Ubuntu Sans Mono', monospace;
  font-weight: 500;
  font-size: 24px; /* was 48px - reduce by half to avoid truncation */
  line-height: 1.087;
  color: rgba(0, 0, 0, 0.9);
  margin: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Description Text for Recovery Screen */
.auth-modal__description-text {
  font-family: 'Ubuntu Mono', monospace;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.087;
  color: #504C4C;
  margin-bottom: 40px;
  max-width: 473px;
}

/* Back to Login Link */
.auth-modal__back-link-container {
  margin-top: 24px;
  text-align: left;
}

.auth-modal__back-link {
  font-family: 'Ubuntu Sans Mono', monospace;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.087;
  color: #949494;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auth-modal__back-link:hover {
  color: #000;
}

.auth-modal__back-link::before {
  content: "←";
  font-size: 16px;
  font-weight: 400;
}

.auth-modal__register-btn {
  background: transparent;
  border: 1px solid #FB2C36;
  border-radius: 0;
  padding: 12px 24px;
  font-family: 'Ubuntu Sans Mono', monospace;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.087;
  color: #000;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.auth-modal__register-btn:hover {
  background: #FB2C36;
  color: #fff;
}

/* Form */
.auth-modal__form {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}

.auth-modal__field {
  position: relative;
  margin-bottom: 0;
}

.auth-modal__field:not(:last-of-type) {
  margin-bottom: 1px;
}


.auth-modal__field::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: #D6D6D6;
  border-radius: 0;
  pointer-events: none;
  z-index: 1;
}

.auth-modal__field.auth-modal__field--first::before {
  border-top-left-radius: 8px;
}

.auth-modal__field.auth-modal__field--last::before {
  border-bottom-left-radius: 8px;
}

.auth-modal__field.auth-modal__field--required::before {
  background: #EE3838;
}

.auth-modal__input {
  width: 100%;
  height: 48px;
  padding: 0 20px;
  border: none;
  border-bottom: 1px solid #E5E5E5;
  border-radius: 0;
  background: #FFFFFF;
  font-family: 'Ubuntu Sans Mono', monospace;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.087;
  color: #000;
  outline: none;
  transition: all 0.2s ease;
}

/* Field Classes for Form Styling */
.auth-modal__input--first {
  border-radius: 8px 8px 0 0;
}

.auth-modal__input--last {
  border-radius: 0 0 8px 8px;
  border-bottom: none;
}

.auth-modal__input--single {
  border-radius: 8px;
  border-bottom: none;
}

/* Feedback: taller message textarea */
.auth-modal__textarea {
  min-height: 144px !important; /* ~3x от базовой высоты поля */
  resize: vertical;
}

.auth-modal__input::placeholder {
  color: #949494;
}

.auth-modal__input:focus {
  box-shadow: none;
  outline: none;
}

.auth-modal__password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.auth-modal__password-toggle img {
  width: 18px;
  height: 18px;
}

/* Спрятать нативные кнопки Edge/IE в полях пароля */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input::-ms-clear { display: none; }

/* Мобильные корректировки */
@media (max-width: 768px) {
  .auth-modal__password-toggle { right: 8px; width: 22px; height: 22px; }
  .auth-modal__password-toggle img { width: 16px; height: 16px; }
}

/* Options */
.auth-modal__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
}

.auth-modal__checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: 'Ubuntu Sans Mono', monospace;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.087;
  color: #000;
}

.auth-modal__checkbox {
  display: none;
}

.auth-modal__checkbox-custom {
  width: 24px;
  height: 24px;
  border: 2px solid #919191;
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}

.auth-modal__checkbox:checked + .auth-modal__checkbox-custom {
  background: #919191;
  border-color: #919191;
}

.auth-modal__checkbox:checked + .auth-modal__checkbox-custom::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -6px;
  margin-left: -2px;
}

.auth-modal__forgot-link {
  font-family: 'Ubuntu Sans Mono', monospace;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.087;
  color: #949494;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-modal__forgot-link:hover {
  color: #000;
}

/* Submit Button - Hero Style */
.auth-modal__submit-btn {
  width: 100%;
  height: 48px;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: transform 160ms ease;
  margin-top: 8px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* нижний слой (тень) */
.auth-modal__submit-btn::before {
  content: '';
  position: absolute;
  top: 4px;
  left: -4px;
  width: 100%;
  height: 48px;
  background: #9F2121;
  z-index: 0;
  border-radius: 4px;
  transition: top 160ms ease, left 160ms ease;
}

/* верхний слой */
.auth-modal__submit-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background: #EE3838;
  z-index: 1;
  border-radius: 4px;
}

/* Hover/Active эффекты */
.auth-modal__submit-btn:hover {
  transform: translateY(-4px);
}

.auth-modal__submit-btn:hover::before {
  top: 8px;
  left: -6px;
}

.auth-modal__submit-btn:active {
  transform: translateY(-1px);
}

.auth-modal__submit-btn:focus-visible {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: 2px;
}

.auth-modal__submit-text {
  position: relative;
  z-index: 3;
  font-family: 'Ubuntu Sans Mono', monospace;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.02;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 2px rgba(0,0,0,0.25);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.auth-modal__footer {
  margin-top: auto;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.auth-modal__footer-left {
  display: flex;
  flex-direction: column;
}

.auth-modal__footer-right {
  display: flex;
  flex-direction: column;
}

.auth-modal__legal-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-modal__legal-link {
  font-family: 'Ubuntu Mono', monospace;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.087;
  color: #504C4C;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-modal__legal-link:hover {
  color: #000;
}

.auth-modal__description {
  font-family: 'Ubuntu Sans Mono', monospace;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.087;
  color: #A49999;
  margin: 0;
}

.auth-modal__contact-text {
  font-family: 'Ubuntu Sans Mono', monospace;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.087;
  color: #A49999;
  margin: 0 0 16px 0;
}

.auth-modal__contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-modal__contact {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-modal__contact-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #949494;
}

.auth-modal__contact-link {
  font-family: 'Ubuntu Mono', monospace;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.087;
  color: #504C4C;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-modal__contact-link:hover {
  color: #000;
}

/* Navbar Auth Button */
.navbar__link--auth {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

.navbar__link--auth:hover {
  opacity: 1;
}

/* Input Error States */
.auth-modal__input--error {
  border: 2px solid #ccc !important;
  box-shadow: 0 0 0 2px rgba(204, 204, 204, 0.2) !important;
}

.auth-modal__field-error {
  position: absolute;
  top: 0;
  left: 100%;
  width: 200px;
  background: #f5f5f5;
  color: #666;
  font-family: 'Ubuntu Sans Mono', monospace;
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 4px;
  margin-left: 12px;
  z-index: 10;
  animation: slideInRight 0.3s ease;
  line-height: 1.3;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-modal__field-error::before {
  content: '';
  position: absolute;
  top: 12px;
  left: -6px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid #f5f5f5;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Submit Button Loading State */
.auth-modal__submit-btn--loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-modal__submit-btn--loading .auth-modal__submit-text::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

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

/* Notifications */
.auth-modal__notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  color: #fff;
  font-family: 'Ubuntu Sans Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  z-index: 30000; /* выше, чем overlay/контейнер модалки */
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 400px;
  word-wrap: break-word;
}

.auth-modal__notification--show {
  transform: translateX(0);
}

.auth-modal__notification--success {
  background: #10B981;
}

.auth-modal__notification--error {
  background: #EF4444;
}

.auth-modal__notification--info {
  background: #3B82F6;
}

/* ДЕСКТОПНЫЕ СТИЛИ ДЛЯ НОВОЙ СТРУКТУРЫ */
@media (min-width: 769px) {
  /* СКРЫВАЕМ МОБИЛЬНЫЕ ЭЛЕМЕНТЫ НА ДЕСКТОПЕ */
  .auth-modal__pricing-card > .auth-modal__pricing-name:not(.auth-modal__pricing-info--desktop .auth-modal__pricing-name),
  .auth-modal__pricing-card > .auth-modal__pricing-amount:not(.auth-modal__pricing-info--desktop .auth-modal__pricing-amount) {
    display: none !important;
  }
  
  /* ПОКАЗЫВАЕМ ДЕСКТОПНЫЕ ЭЛЕМЕНТЫ */
  .auth-modal__pricing-info--desktop {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-left: 136px !important;
    width: calc(100% - 136px) !important;
    height: 100% !important;
  }
  
  .auth-modal__pricing-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
  }
  
  .auth-modal__pricing-desc {
    display: block !important;
  }
  
  .auth-modal__pricing-price {
    display: flex !important;
    align-items: baseline !important;
    gap: 4px !important;
    text-align: center !important;
  }
  
  .auth-modal__pricing-currency,
  .auth-modal__pricing-amount,
  .auth-modal__pricing-period {
    display: inline !important;
  }

  /* СБРАСЫВАЕМ МОБИЛЬНЫЕ СТИЛИ НА ДЕСКТОПЕ */
  .auth-modal__pricing {
    margin-top: 40px !important;
    padding: 0 67px !important;
    max-width: 535px !important;
  }

  .auth-modal__pricing-title {
    font-size: 24px !important;
    margin-bottom: 40px !important;
  }

  .auth-modal__pricing-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    align-items: center !important;
    margin-bottom: 0 !important;
  }

  .auth-modal__pricing-card {
    width: 468px !important;
    height: 160px !important;
    padding: 26px 35px !important;
    border-radius: 22px !important;
  }

  .auth-modal__pricing-icon {
    position: absolute !important;
    left: 35px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 61px !important;
    height: 104px !important;
    margin-bottom: 0 !important;
  }
}

/* Responsive Design */
@media (max-width: 1440px) {
  .auth-modal__container {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
  }
}

@media (max-width: 1024px) {
  .auth-modal__container {
    width: min(1000px, 90vw);
    height: min(700px, 90vh);
  }

  .auth-modal__left {
    width: 50%;
  }

  /* Reset registration and payment modifiers to inherit from base */
  .auth-modal__left--registration,
  .auth-modal__left--payment,
  .auth-modal__left--plan-details {
    width: 50%;
  }
  
  .auth-modal__right {
    padding: 30px 30px 30px 30px;
  }
  
  .auth-modal__title {
    font-size: 36px;
  }
  
  .auth-modal__input {
    width: 100%;
    font-size: 24px;
  }
}

/* ===== ВАРИАНТ 1: ПОЛНАЯ ПЕРЕРАБОТКА С FLEXBOX ===== */
@media (max-width: 768px) {
  /* ОСНОВНОЙ КОНТЕЙНЕР */
  .auth-modal__container {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
  }

  .auth-modal__content {
    flex-direction: column !important;
    height: 100vh !important;
    width: 100% !important;
  }

  /* ЛЕВАЯ ПАНЕЛЬ - МИНИМАЛЬНАЯ */
  .auth-modal__left {
    width: 100% !important;
    height: 160px !important;
    min-height: 160px !important;
    padding: 5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .auth-modal__left--registration,
  .auth-modal__left--payment,
  .auth-modal__left--plan-details {
    width: 100% !important;
    height: 160px !important;
    min-height: 160px !important;
  }

  /* ПРАВАЯ ПАНЕЛЬ - FLEXBOX КОМПОНОВКА */
  .auth-modal__right {
    width: 100% !important;
    padding: 8px 10px !important;
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* УБИРАЕМ ВСЕ АБСОЛЮТНОЕ ПОЗИЦИОНИРОВАНИЕ */
  .auth-modal__right * {
    position: static !important;
    transform: none !important;
  }

  /* КНОПКА ЗАКРЫТИЯ - ЕДИНСТВЕННАЯ АБСОЛЮТНАЯ */
  .auth-modal__close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 24px !important;
    height: 24px !important;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
  }

  /* ЗАГОЛОВОК - ПРОСТАЯ FLEXBOX КОМПОНОВКА */
  .auth-modal__header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-right: 30px !important;
    margin-bottom: 8px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
  }

  .auth-modal__title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #000 !important;
    margin: 0 !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* КНОПКА НАВИГАЦИИ В ЗАГОЛОВКЕ */
  .auth-modal__header .auth-modal__nav-btn {
    padding: 4px 8px !important;
    font-size: 12px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    color: #666 !important;
    text-decoration: none !important;
  }

  /* КНОПКА "ВХОД В СИСТЕМУ" - КОМПАКТНАЯ ДЛЯ МОБИЛЬНЫХ */
  .auth-modal__register-btn {
    padding: 4px 8px !important;
    font-size: 10px !important;
    border: 1px solid #FB2C36 !important;
    border-radius: 4px !important;
    background: transparent !important;
    color: #000 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .auth-modal__register-btn:hover {
    background: #FB2C36 !important;
    color: #fff !important;
  }


  /* КНОПКИ НАВИГАЦИИ */
  .auth-modal__nav-btn {
    padding: 8px 12px !important;
    font-size: 14px !important;
    margin: 5px !important;
    background: transparent !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 4px !important;
    color: #666 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
    box-sizing: border-box !important;
  }

  .auth-modal__nav-btn:hover {
    border-color: #EE3838 !important;
    color: #EE3838 !important;
  }

  /* ===== ПОЛНАЯ ПЕРЕДЕЛКА ТАРИФОВ ДЛЯ МОБИЛЬНЫХ ===== */
  
  /* КОНТЕЙНЕР ТАРИФОВ - ПОДНИМАЕМ НАВЕРХ */
  .auth-modal__pricing {
    margin-top: 0 !important;
    padding: 0 8px !important;
    max-width: none !important;
  }

  .auth-modal__pricing-title {
    font-size: 14px !important;
    margin-bottom: 8px !important;
    line-height: 1.2 !important;
  }

  .auth-modal__pricing-cards {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    flex-shrink: 0 !important;
  }

  /* КАРТОЧКА ТАРИФА - БОЛЬШИЕ И КРАСИВЫЕ */
  .auth-modal__pricing-card {
    width: 100% !important;
    height: 80px !important;
    padding: 8px 4px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: #FFFFFF !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    position: relative !important;
    cursor: pointer !important;
  }

  /* ВЫБРАННАЯ КАРТОЧКА */
  .auth-modal__pricing-card--selected {
    border-color: #EE3838 !important;
    background: #FFF5F5 !important;
  }

  /* ИКОНКА - БОЛЬШЕ */
  .auth-modal__pricing-icon {
    width: 24px !important;
    height: 24px !important;
    margin-bottom: 4px !important;
    flex-shrink: 0 !important;
    position: static !important;
    transform: none !important;
  }

  .auth-modal__pricing-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  /* НАЗВАНИЕ ТАРИФА - ЧИТАБЕЛЬНО */
  .auth-modal__pricing-name {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #000 !important;
    margin: 0 0 2px 0 !important;
    line-height: 1.1 !important;
    text-align: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* ЦЕНА - ВИДИМАЯ */
  .auth-modal__pricing-amount {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #EE3838 !important;
    margin: 0 !important;
    line-height: 1.0 !important;
  }

  /* СКРЫВАЕМ ДЕСКТОПНЫЕ ЭЛЕМЕНТЫ НА МОБИЛЬНЫХ */
  .auth-modal__pricing-info--desktop,
  .auth-modal__pricing-left,
  .auth-modal__pricing-desc,
  .auth-modal__pricing-price,
  .auth-modal__pricing-currency,
  .auth-modal__pricing-period {
    display: none !important;
  }

  /* УВЕДОМЛЕНИЕ О ВЫБОРЕ ПЛАНА */
  .auth-modal__plan-notice {
    font-size: 11px !important;
    padding: 6px 8px !important;
    margin-bottom: 6px !important;
    text-align: center !important;
    background: #F8F8F8 !important;
    border-radius: 4px !important;
    color: #666 !important;
    flex-shrink: 0 !important;
  }

  /* ФОРМА - ПРОСТАЯ КОМПОНОВКА */
  .auth-modal__form {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
    flex-shrink: 0 !important;
  }

  /* ПОЛЯ ВВОДА */
  .auth-modal__input {
    width: 100% !important;
    height: 36px !important;
    font-size: 14px !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 4px !important;
    background: #FFFFFF !important;
  }

  /* КНОПКА РЕГИСТРАЦИИ - ВОССТАНАВЛИВАЕМ ПОЗИЦИОНИРОВАНИЕ */
  .auth-modal__submit-btn {
    width: 100% !important;
    height: 36px !important;
    margin-top: 6px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    overflow: visible !important;
  }

  .auth-modal__submit-btn::before {
    content: '' !important;
    position: absolute !important;
    top: 2px !important;
    left: -2px !important;
    width: 100% !important;
    height: 36px !important;
    background: #9F2121 !important;
    z-index: 0 !important;
    border-radius: 4px !important;
  }

  .auth-modal__submit-btn::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 36px !important;
    background: #EE3838 !important;
    z-index: 1 !important;
    border-radius: 4px !important;
  }

  .auth-modal__submit-text {
    position: relative !important;
    z-index: 3 !important;
    color: #fff !important;
    font-size: 14px !important;
  }

  /* ФУТЕР - КОМПАКТНЫЙ */
  .auth-modal__footer {
    margin-top: 8px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
  }

  /* КНОПКА ЗАКРЫТИЯ */
  .auth-modal__close {
    top: 8px !important;
    right: 8px !important;
    width: 26px !important;
    height: 26px !important;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
  }

  .auth-modal__close img {
    width: 14px !important;
    height: 14px !important;
  }
}

@media (max-width: 480px) {
  .auth-modal__right {
    padding: 20px 16px;
  }
  
  .auth-modal__title {
    font-size: 24px;
  }
  
  .auth-modal__input {
    width: 100%;
    font-size: 18px;
    height: 48px;
  }
  
  .auth-modal__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 40px;
  }
  
  .auth-modal__header::after {
    display: none;
  }
}

/* Payment Modal Styles */
/* Back to Plans Button */
.auth-modal__back-to-plans {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: #504C4C;
  font-family: 'Ubuntu Mono', monospace;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.087;
  cursor: pointer;
  padding: 0;
  transition: color 0.3s ease;
  margin-bottom: 30px;
}

.auth-modal__back-to-plans:hover {
  color: #EE3838;
}

.auth-modal__back-to-plans svg {
  color: #CDCDCD;
  transition: color 0.3s ease;
}

.auth-modal__back-to-plans:hover svg {
  color: #EE3838;
}

/* Extra small screens */
/* ===== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (≤ 480px) ===== */
@media (max-width: 480px) {
  /* ЕЩЕ БОЛЕЕ КОМПАКТНАЯ ЛЕВАЯ ПАНЕЛЬ */
  .auth-modal__left {
    height: 140px !important;
    min-height: 140px !important;
    padding: 3px !important;
  }

  .auth-modal__left--registration,
  .auth-modal__left--payment,
  .auth-modal__left--plan-details {
    height: 140px !important;
    min-height: 140px !important;
  }
  
  /* МИНИМАЛЬНЫЕ ОТСТУПЫ ДЛЯ ПРАВОЙ ПАНЕЛИ */
  .auth-modal__right {
    padding: 6px 8px !important;
    gap: 6px !important;
  }
  
  /* КОМПАКТНЫЙ ЗАГОЛОВОК */
  .auth-modal__header {
    height: 28px !important;
    padding-right: 25px !important;
    margin-bottom: 6px !important;
  }
  
  .auth-modal__title {
    font-size: 14px !important;
  }

  .auth-modal__header .auth-modal__nav-btn {
    padding: 3px 6px !important;
    font-size: 10px !important;
  }

  /* КНОПКА "ВХОД В СИСТЕМУ" - ЕЩЕ КОМПАКТНЕЕ ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ */
  .auth-modal__register-btn {
    padding: 3px 6px !important;
    font-size: 9px !important;
    border: 1px solid #FB2C36 !important;
    border-radius: 3px !important;
    background: transparent !important;
    color: #000 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .auth-modal__register-btn:hover {
    background: #FB2C36 !important;
    color: #fff !important;
  }
  
  /* КОМПАКТНЫЕ ТАРИФЫ ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ */
  .auth-modal__pricing {
    padding: 0 6px !important;
  }

  .auth-modal__pricing-title {
    font-size: 12px !important;
    margin-bottom: 6px !important;
  }

  .auth-modal__pricing-cards {
    gap: 6px !important;
    margin-bottom: 12px !important;
  }

  .auth-modal__pricing-card {
    height: 70px !important;
    padding: 6px 3px !important;
  }

  .auth-modal__pricing-icon {
    width: 20px !important;
    height: 20px !important;
    margin-bottom: 3px !important;
  }

  .auth-modal__pricing-name {
    font-size: 10px !important;
  }

  .auth-modal__pricing-amount {
    font-size: 11px !important;
  }

  .auth-modal__plan-notice {
    font-size: 10px !important;
    padding: 4px 6px !important;
    margin-bottom: 4px !important;
  }
  
  /* КОМПАКТНЫЕ ПОЛЯ ВВОДА */
  .auth-modal__input {
    height: 32px !important;
    font-size: 13px !important;
    padding: 0 8px !important;
  }

  .auth-modal__form {
    gap: 4px !important;
    margin-bottom: 6px !important;
  }
  
  /* КОМПАКТНАЯ КНОПКА */
  .auth-modal__submit-btn {
    height: 32px !important;
    margin-top: 4px !important;
    position: relative !important;
    overflow: visible !important;
  }
  
  .auth-modal__submit-btn::before {
    height: 32px !important;
    top: 1px !important;
  }
  
  .auth-modal__submit-btn::after {
    height: 32px !important;
  }
  
  .auth-modal__submit-text {
    font-size: 13px !important;
    position: relative !important;
    z-index: 3 !important;
    color: #fff !important;
  }

  /* КОМПАКТНАЯ КНОПКА ЗАКРЫТИЯ */
  .auth-modal__close {
    width: 22px !important;
    height: 22px !important;
    top: 6px !important;
    right: 6px !important;
  }

  .auth-modal__close img {
    width: 12px !important;
    height: 12px !important;
  }

  /* КОМПАКТНЫЙ ФУТЕР */
  .auth-modal__footer {
    font-size: 10px !important;
    margin-top: 6px !important;
  }
}

/* Payment Placeholder */
.auth-modal__payment-placeholder {
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  min-height: 200px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999999;
  font-family: 'Ubuntu Sans', sans-serif;
  font-size: 14px;
  text-align: center;
  padding: 40px 20px;
}

/* Responsive Design for Payment Modal */
@media (max-width: 768px) {
  .auth-modal__payment-placeholder {
    min-height: 150px;
    padding: 30px 15px;
  }
}
