/* استایل overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.overflow_hidden {
  overflow: hidden;
}
/* باکس اصلی مدال */
.modal-box {
  background-color: #fff;
  width: 90%;
  max-width: 670px;
  padding: 24px;
  direction: rtl;
  font-family: "IRANSans", sans-serif;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border: 1px solid #d0d0d0;
  border-radius: 24px;
}

/* انیمیشن ورود */
.animate-modal {
  animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* بخش بالایی */
.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.modal-top__logo {
  flex-shrink: 0;
  margin-left: 12px;
  display: flex;
}

.modal-top__text {
  flex: 1;
  text-align: right;
}
.modal-top__holder {
  display: flex;
  align-items: center;
}

.modal-top__holder-texts {
  display: flex;
  gap: 2px;
  flex-direction: column;
}

.modal-top__text__info {
  font-size: 14px;
  color: var(--gray-dark);
  font-weight: 500;
}

.modal-top__text__title {
  color: #dc2626;
  font-size: 22px;
  font-weight: bolder;
  margin: 0;
}

.modal-top__text__sub-text {
  color: #434343;
  font-size: 18px;
  margin: 0;
  font-weight: 400;
  margin-top: 5px;
}

.modal-close {
  position: absolute;
  top: 0;
  left: 0;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-dashed-line {
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    #efefef 0,
    #efefef 8px,
    transparent 8px,
    transparent 16px
  );
  width: 90%;
  margin: 0 auto;
}

/* بخش پایینی */
.modal-bottom-parent {
  display: flex;
  justify-content: space-between;
}
.modal-bottom {
  display: flex;
  justify-content: space-between;
  gap: 0;
  align-items: center;
  height: 50px;
  flex: 1 1 auto;
}
.modal-buttons {
  display: flex;
  gap: 36px;
}

/* دکمه‌های عمومی */
.btn {
  padding: 12px 0;
  height: 100%;
  border-radius: 11px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  text-shadow: 0.3px 0 0 currentColor;
}

/* دکمه مشکی (دریافت کد تخفیف) */
.btn--black {
  background-color: #1f78ff;
  color: #fff;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px 0 0 10px;
}

.btn--black:disabled {
  cursor: no-drop;
  background-color: #1e293b;
}

.btn--black.loader span {
  display: none;
}

.btn--black.loader::after {
  content: "";
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: block;
  border: 2px solid transparent;
  border-top: 2px solid #fff;
  animation: rotate 0.5s linear infinite;
}

@keyframes rotate {
  100% {
    rotate: 1turn;
  }
}

.modal-top__text__input-wrapper {
  position: relative;
  width: 100%;
  height: 51px;
  display: none;
}

.modal-top__text__input-wrapper__custom-input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  height: 100%;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid #e2e8f0;
  border-radius: 0 11px 11px 0;
  background: #ffffff;
  color: #1e293b;
  transition: all 0.3s ease;
  outline: none;
  direction: ltr;
  text-align: left;
}

.error .modal-top__text__input-wrapper__custom-input {
  border: 1.5px solid #dc2626;
}

.modal-top__text__input-wrapper__custom-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  direction: rtl;
  text-align: right;
}

.modal-top__text__input-wrapper__custom-input:focus {
  border-color: #6366f1;
}

.modal-top__text__input-wrapper__custom-input:hover {
  border-color: #cbd5e1;
}

.modal-top__text__input-wrapper__input-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: color 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* دکمه خاکستری (فعلاً نه!) */
.btn--gray {
  background-color: rgba(51, 51, 51, 0.13);
  color: #333333;
  min-width: 170px;
}

.modal-box__shape {
  position: absolute;
  left: 0px;
  width: 33px;
  height: 64px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0 55px 55px 0;
  z-index: 10;
  top: 50%;
  transform: translateY(-50%);
}

.modal-box__shape.right {
  position: absolute;
  width: 33px;
  height: 64px;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10;
  top: 50%;
  transform: translateY(-50%);
  left: unset;
  right: 0;
  border-radius: 55px 0 0 55px;
}

.coupon {
  width: 100%;
  height: 100%;
  background: #eee;
  border-radius: 8px;
  user-select: all;
  display: flex;
  align-items: center;
  justify-content: center;
}

.get-number__form--inp.coupon {
  text-align: center;
  color: var(--green);
  background: #fff;
  font-weight: 500;
  user-select: all;
}
@media (max-width: 375px) {
  .btn--gray,
  .btn--black {
    padding: 10px 7px;
    font-size: 14px;
    width: 50%;
  }
  .modal-buttons {
    gap: 15px;
  }
  .modal-box {
    padding: 9px 16px 16px 16px !important;
  }
  .btn--gray,
  .btn--black {
    padding: 10px 3px !important;
  }
  .modal-buttons {
    gap: 10px;
  }
}
@media (max-width: 800px) {
  .modal-close {
    top: 10px;
    left: 0;
  }
  .modal-close img {
    width: 24px;
    height: 24px;
  }
  .modal-bottom-parent {
    flex-direction: column;
    gap: 12px;
  }
  .modal-top__text__input-wrapper {
    width: 100%;
    height: 40px;
  }
  .modal-top__text__input-wrapper__custom-input {
    border-radius: 11px !important;
  }
  .modal-buttons {
    justify-content: space-between;
  }
  .btn--black {
    border-radius: 11px;
    width: 50%;
  }
  .btn--gray {
    width: 50%;
    min-width: unset;
  }
  .modal-dashed-line {
    display: none;
  }
  .modal-top__text {
    margin-bottom: 15px;
  }
  .get-number__form--inp {
    border-radius: 11px !important;
  }
}

@media (min-width: 576px) {
  .modal-dashed-line {
    width: 100%;
    margin: 20px 0 30px;
  }
  .modal-top__text__sub-text {
    margin-top: 16px;
    padding-right: 15px;
  }
}
@media (min-width: 576px) and (max-width: 767px) {
  .btn {
    padding: 15px 0;
  }
}

@media (max-width: 575px) {
  .modal-box {
    padding: 9px 20px 20px 20px;
  }

  .modal-box::after {
    content: unset;
  }

  .modal-box::before {
    left: -42px;
  }

  .modal-top__logo img {
    width: 40px;
  }

  .modal-top__text__title {
    font-size: 14px;
  }

  .modal-top__text__sub-text {
    font-size: 12px;
  }

  .btn--gray,
  .btn--black {
    padding: 10px 13px;
    font-size: 14px;
  }

  .modal-top__text__input-wrapper__custom-input {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 10px;
  }

  .modal-bottom {
    gap: 8px;
  }
}

.get-number__form--label {
  position: absolute;
  right: 10px;
  top: -12px;
  background: #fff;
  padding: 0 5px;
  color: #595959;
  font-weight: 500;
  font-size: 14px;
}

.get-number__form--inp {
  height: 100%;
  border: 0;
  outline: 0;
  direction: ltr;
  border-radius: 0 11px 11px 0;
  width: 100%;
  font-size: var(--text-big);
  font-family: inherit;
  border: 1px solid #bbb;
}

.get-number__form--inp.citiesList {
  text-align: right;
  direction: rtl;
}

.modal-top__text__input-wrapper.loader::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top: 2px solid #1f78ff;
  position: absolute;
  left: 12px;
  top: 16px;
  animation: rotate 0.5s infinite linear;
}

@keyframes rotate {
  100% {
    rotate: 1turn;
  }
}

.get-number__cities {
  width: 100%;
  position: absolute;
  display: flex;
  flex-direction: column;
  right: 0;
  padding: 0 !important;
  top: 104%;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  transition: all 0.3s ease;
  max-height: 0px;
  opacity: 0;
  scrollbar-width: thin;
}

.get-number__cities.show {
  max-height: 200px;
  opacity: 1;
  overflow-y: auto;
}

.get-number__cities li {
  list-style: none;
  padding: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.get-number__cities li:hover {
  background: #d1d1d1;
}
