/* Quick order modal — match dentins.ru «Быстрый заказ» */

.qo-overlay {
  position: fixed;
  inset: 0;
  z-index: 20050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
  background: rgba(38, 38, 38, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.qo-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.qo-modal {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  margin: 0;
  padding: 40px 36px 32px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  font-family: Roboto, Arial, sans-serif;
  color: #262626;
  transform: translateY(8px);
  transition: transform 0.2s ease;
}

.qo-overlay.is-open .qo-modal {
  transform: translateY(0);
}

.qo-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  appearance: none;
}

.qo-modal__close::before,
.qo-modal__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: #262626;
}

.qo-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.qo-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.qo-modal__title {
  margin: 0 0 28px;
  color: #262626;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
}

.qo-form {
  margin: 0;
  padding: 0;
}

.qo-form__group {
  margin: 0 0 14px;
}

.qo-form__input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #dddddd;
  border-radius: 6px;
  background: #fff;
  color: #262626;
  font-family: Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.3;
  outline: none;
  box-shadow: none;
  transition: border-color 0.2s ease;
}

.qo-form__input::placeholder {
  color: #999999;
  opacity: 1;
}

.qo-form__input:focus {
  border-color: #ffd801;
}

.qo-form__input.is-error {
  border-color: #e53935;
}

.qo-phone {
  display: flex;
  align-items: stretch;
  gap: 0;
  box-sizing: border-box;
  width: 100%;
  height: 52px;
  border: 1px solid #dddddd;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.qo-phone:focus-within {
  border-color: #ffd801;
}

.qo-phone.is-error {
  border-color: #e53935;
}

.qo-phone__country {
  position: relative;
  flex: 0 0 auto;
  border-right: 1px solid #dddddd;
}

.qo-phone__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  height: 100%;
  min-width: 64px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  background: #fff;
  cursor: pointer;
  appearance: none;
}

.qo-phone__flag {
  display: block;
  width: 22px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.qo-phone__chevron {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #666;
  border-bottom: 1.5px solid #666;
  transform: translateY(-2px) rotate(45deg);
}

.qo-phone__list {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 2;
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  box-sizing: border-box;
  width: 180px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid #dddddd;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.qo-phone__country.is-open .qo-phone__list {
  display: flex;
}

.qo-phone__option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.qo-phone__option:hover,
.qo-phone__option.is-active {
  background: #f5f5f5;
}

.qo-phone__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #262626;
  font-family: Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  outline: none;
  box-shadow: none;
}

.qo-phone__input::placeholder {
  color: #999999;
  opacity: 1;
}

.qo-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 52px;
  margin: 8px 0 0;
  padding: 0 20px;
  border: 1px solid #ffd801;
  border-radius: 6px;
  background: #ffd801;
  color: #262626;
  font-family: Roboto, Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  appearance: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.qo-form__submit:hover,
.qo-form__submit:focus {
  background: #eece24;
  border-color: #eece24;
}

.qo-form__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.qo-form__legal {
  margin: 18px 0 0;
  color: #999999;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.4;
  text-align: center;
}

.qo-form__legal a {
  color: #999999;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.qo-form__legal a:hover {
  color: #666666;
}

.qo-form__msg {
  display: none;
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.qo-form__msg.is-error {
  display: block;
  color: #e53935;
}

.qo-form__msg.is-success {
  display: block;
  color: #2e7d32;
}

body.qo-locked {
  overflow: hidden;
}

@media (max-width: 480px) {
  .qo-modal {
    padding: 32px 20px 24px;
    border-radius: 10px;
  }

  .qo-modal__title {
    font-size: 20px;
    margin-bottom: 22px;
  }
}
