/* Форма обратного звонка и модальное окно. Акцент берётся из темы (--mk-accent). */
:root {
  --mk-accent: #bc4326;
  --mk-accent-ink: #fff6f0;
  --mk-ink: #1a1613;
  --mk-line: #e2dcd2;
  --mk-surface: #ffffff;
  --mk-muted: #6a625a;
}

/* ---------- Модальное окно ---------- */
.mk-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mk-modal[hidden] { display: none; }
.mk-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 10, 6, 0.55);
  backdrop-filter: blur(3px);
  animation: mk-fade 0.2s ease;
}
.mk-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: var(--mk-surface);
  color: var(--mk-ink);
  border-radius: 12px;
  padding: 32px clamp(20px, 4vw, 34px);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.6);
  animation: mk-pop 0.22s ease;
}
.mk-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--mk-muted);
  cursor: pointer;
}
.mk-modal__close:hover { color: var(--mk-ink); }
.mk-modal__eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mk-accent);
  font-weight: 700;
}
.mk-modal__title {
  margin: 10px 0 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
}
.mk-modal__product {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: rgba(188, 67, 38, 0.08);
  border-radius: 6px;
  font-size: 14px;
}
.mk-modal__product b { color: var(--mk-accent); }

/* ---------- Форма ---------- */
.mk-form { margin-top: 18px; display: grid; gap: 12px; }
.mk-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mk-form__field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mk-muted);
}
.mk-form input,
.mk-form select {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 12px 14px;
  border: 1.5px solid var(--mk-line);
  border-radius: 6px;
  background: #fff;
  color: var(--mk-ink);
}
.mk-form input:focus,
.mk-form select:focus {
  outline: none;
  border-color: var(--mk-accent);
}
/* Своя стрелка вместо дефолтной браузерной */
.mk-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23191815' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.mk-form select::-ms-expand { display: none; }
/* На тёмной секции — стрелка светлая */
.mk-cta .mk-form--inline select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
}

/* ---------- Фирменный выпадающий список (JS-компонент) ---------- */
.mk-select { position: relative; }
/* Нативный select прячем, но оставляем для отправки формы и доступности */
.mk-select__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.mk-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  text-align: left;
  padding: 12px 14px;
  border: 1.5px solid var(--mk-line);
  border-radius: 6px;
  background: #fff;
  color: var(--mk-ink);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.mk-select__trigger:hover { border-color: #cfc7ba; }
.mk-select__trigger:focus-visible,
.mk-select.is-open .mk-select__trigger {
  outline: none;
  border-color: var(--mk-accent);
}
.mk-select__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-select__arrow {
  flex: none;
  color: var(--mk-muted);
  transition: transform 0.22s ease;
}
.mk-select.is-open .mk-select__arrow { transform: rotate(180deg); }

.mk-select__list {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 288px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--mk-line);
  border-radius: 10px;
  box-shadow: 0 26px 54px -26px rgba(20, 15, 10, 0.4);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.mk-select.is-up .mk-select__list {
  top: auto;
  bottom: calc(100% + 6px);
  transform: translateY(6px);
}
.mk-select.is-open .mk-select__list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mk-select__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.25;
  color: var(--mk-ink);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.mk-select__option.is-active { background: #f4f2ed; }
.mk-select__option[aria-selected="true"] {
  color: var(--mk-accent);
  font-weight: 600;
}
.mk-select__option[aria-selected="true"]::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%23bc4326' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 7.5 5.5 11 12 3'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Тёмная секция (.mk-cta): дропдаун тоже тёмный */
.mk-cta .mk-form--inline .mk-select__trigger {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.mk-cta .mk-form--inline .mk-select__arrow { color: rgba(255, 255, 255, 0.7); }
.mk-cta .mk-form--inline .mk-select__list {
  background: #211b16;
  border-color: rgba(255, 255, 255, 0.16);
}
.mk-cta .mk-form--inline .mk-select__option { color: rgba(255, 255, 255, 0.86); }
.mk-cta .mk-form--inline .mk-select__option.is-active { background: rgba(255, 255, 255, 0.1); }
.mk-cta .mk-form--inline .mk-select__option[aria-selected="true"] { color: #f0b8a6; }
.mk-form__submit {
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 14px;
  border: 0;
  border-radius: 6px;
  background: var(--mk-accent);
  color: var(--mk-accent-ink);
  transition: filter 0.15s ease;
}
.mk-form__submit:hover { filter: brightness(1.06); }
.mk-form__submit[disabled] { opacity: 0.6; cursor: progress; }
.mk-form__consent { margin: 0; font-size: 12px; color: var(--mk-muted); }
.mk-form__result { margin: 0; font-size: 14px; font-weight: 600; }
.mk-form__result--ok { color: #1f8a4c; }
.mk-form__result--error { color: #c0392b; }

/* Встроенная форма на тёмной секции (когда внутри .mk-cta) */
.mk-cta .mk-form--inline input,
.mk-cta .mk-form--inline select {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.mk-cta .mk-form--inline .mk-form__field label { color: rgba(255, 255, 255, 0.7); }
.mk-cta .mk-form--inline .mk-form__consent { color: rgba(255, 255, 255, 0.6); }

/* ---------- Тост ---------- */
.mk-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  background: var(--mk-ink);
  color: #fff;
  padding: 14px 22px;
  border-radius: 8px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: 0.35s ease;
  z-index: 1100;
}
.mk-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes mk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mk-pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 520px) {
  .mk-form__row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-modal__overlay,
  .mk-modal__dialog,
  .mk-toast,
  .mk-select__list,
  .mk-select__arrow { animation: none; transition: none; }
}
