/* ═══════════════════════════════════════════════════════════
   NORMETRA — модалка «Заявка из калькулятора»
   Бренд: yellow #f5b400 / navy #212d45, шрифты Montserrat + Open Sans
   ═══════════════════════════════════════════════════════════ */

.nm-quote-modal{
  position:fixed;inset:0;z-index:9999;
  display:flex;align-items:center;justify-content:center;
  font-family:'Open Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  color:#212d45;
}
.nm-quote-modal[hidden]{display:none!important}

.nmqm-backdrop{
  position:absolute;inset:0;
  background:rgba(33,45,69,.62);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  animation:nmqm-fade .22s ease-out;
  cursor:pointer;
}

.nmqm-card{
  position:relative;
  width:100%;max-width:460px;
  margin:24px;
  background:#fff;
  border-radius:14px;
  box-shadow:0 24px 60px rgba(33,45,69,.28), 0 4px 14px rgba(33,45,69,.12);
  padding:34px 32px 28px;
  animation:nmqm-pop .26s cubic-bezier(.2,.85,.35,1.05);
  max-height:calc(100vh - 48px);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}

.nmqm-card::before{
  content:"";
  position:absolute;top:0;left:0;right:0;height:4px;
  background:repeating-linear-gradient(45deg,#f5b400 0 18px,#212d45 18px 36px);
  border-radius:14px 14px 0 0;
}

.nmqm-close{
  position:absolute;top:10px;right:10px;
  width:36px;height:36px;
  display:flex;align-items:center;justify-content:center;
  background:transparent;border:none;border-radius:50%;
  font-size:26px;line-height:1;color:#5e6776;cursor:pointer;
  transition:background .15s,color .15s,transform .1s;
}
.nmqm-close:hover{background:#f3f4f7;color:#212d45}
.nmqm-close:active{transform:scale(.94)}

.nmqm-head{margin-bottom:22px}
.nmqm-eyebrow{
  display:inline-block;
  font-family:'Montserrat',sans-serif;font-weight:700;
  font-size:11px;letter-spacing:.18em;text-transform:uppercase;
  color:#d4a000;margin-bottom:10px;
}
.nmqm-card h3{
  margin:0 0 8px;
  font-family:'Montserrat',sans-serif;font-weight:800;
  font-size:24px;line-height:1.2;color:#212d45;
}
.nmqm-lead{
  margin:0;color:#5e6776;font-size:14px;line-height:1.5;
}

.nmqm-form{display:flex;flex-direction:column;gap:14px}

.nmqm-field{display:flex;flex-direction:column;position:relative}
.nmqm-field-label{
  font-size:12px;color:#5e6776;margin-bottom:6px;font-weight:600;
  font-family:'Montserrat',sans-serif;letter-spacing:.02em;
}
.nmqm-field input{
  width:100%;padding:13px 15px;font-size:15px;font-family:inherit;
  color:#212d45;background:#fff;
  border:1px solid #e6e9f0;border-radius:6px;outline:none;
  transition:border-color .15s, box-shadow .15s;
  -webkit-appearance:none;appearance:none;
  box-sizing:border-box;min-height:46px;
}
.nmqm-field input::placeholder{color:#b3b9c4}
.nmqm-field input:focus{
  border-color:#f5b400;
  box-shadow:0 0 0 3px rgba(245,180,0,.18);
}
.nmqm-field.is-error input{
  border-color:#e54848;
  box-shadow:0 0 0 3px rgba(229,72,72,.12);
}

.nmqm-error{
  display:none;
  font-size:12px;color:#e54848;margin-top:5px;
}
.nmqm-field.is-error .nmqm-error{display:block}

.nmqm-agree{
  display:flex;align-items:flex-start;gap:10px;
  font-size:12px;line-height:1.5;color:#5e6776;
  cursor:pointer;user-select:none;
  padding:4px 0 2px;
}
.nmqm-agree input[type=checkbox]{
  position:absolute;opacity:0;width:0;height:0;pointer-events:none;
}
.nmqm-agree-box{
  flex-shrink:0;
  width:18px;height:18px;margin-top:1px;
  background:#fff;border:1.5px solid #c7cdd6;border-radius:4px;
  display:flex;align-items:center;justify-content:center;
  color:transparent;
  transition:background .15s,border-color .15s,color .15s;
}
.nmqm-agree input:checked + .nmqm-agree-box{
  background:#f5b400;border-color:#f5b400;color:#212d45;
}
.nmqm-agree:hover .nmqm-agree-box{border-color:#f5b400}
.nmqm-agree input:focus-visible + .nmqm-agree-box{
  box-shadow:0 0 0 3px rgba(245,180,0,.25);
}
.nmqm-agree.is-error .nmqm-agree-box{border-color:#e54848}
.nmqm-agree-text a{color:#212d45;text-decoration:underline;text-decoration-color:#f5b400;text-underline-offset:2px}
.nmqm-agree-text a:hover{color:#d4a000}

.nmqm-submit{
  display:flex;align-items:center;justify-content:center;gap:8px;
  width:100%;margin-top:4px;padding:16px;
  background:#f5b400;color:#212d45;
  border:none;border-radius:6px;cursor:pointer;
  font-size:14px;font-weight:700;font-family:'Montserrat',sans-serif;
  letter-spacing:.06em;text-transform:uppercase;
  min-height:50px;
  transition:background .15s, transform .1s, box-shadow .2s;
}
.nmqm-submit:hover{background:#e0a200;box-shadow:0 10px 22px rgba(245,180,0,.35)}
.nmqm-submit:active{transform:translateY(1px)}
.nmqm-submit:disabled{opacity:.7;cursor:wait;background:#d4a000}
.nmqm-submit-arrow{font-size:18px;transition:transform .18s}
.nmqm-submit:hover .nmqm-submit-arrow{transform:translateX(3px)}

.nmqm-hint{
  margin:8px 0 0;text-align:center;
  font-size:11px;color:#9ca3af;line-height:1.5;
}

.nmqm-success{
  text-align:center;padding:18px 8px 6px;
  animation:nmqm-fade .25s ease-out;
}
.nmqm-success-icon{
  color:#28a745;margin-bottom:14px;display:flex;justify-content:center;
}
.nmqm-success-icon svg circle{stroke-dasharray:138;stroke-dashoffset:138;animation:nmqm-draw-c .5s ease-out forwards}
.nmqm-success-icon svg path{stroke-dasharray:34;stroke-dashoffset:34;animation:nmqm-draw-p .35s .35s ease-out forwards}
.nmqm-success h4{
  margin:0 0 8px;
  font-family:'Montserrat',sans-serif;font-weight:800;font-size:20px;color:#212d45;
}
.nmqm-success p{margin:0;color:#5e6776;font-size:14px;line-height:1.55}

@keyframes nmqm-fade{from{opacity:0}to{opacity:1}}
@keyframes nmqm-pop{
  from{opacity:0;transform:translateY(16px) scale(.96)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes nmqm-draw-c{to{stroke-dashoffset:0}}
@keyframes nmqm-draw-p{to{stroke-dashoffset:0}}

body.nmqm-open{overflow:hidden}

@media (max-width:560px){
  .nmqm-card{
    margin:0;
    max-width:100%;
    min-height:100vh;
    min-height:100dvh;
    max-height:100vh;
    max-height:100dvh;
    border-radius:0;
    padding:54px 20px 24px;
    display:flex;flex-direction:column;
  }
  .nmqm-card::before{border-radius:0}
  .nmqm-close{top:12px;right:12px;width:40px;height:40px;font-size:28px}
  .nmqm-card h3{font-size:22px}
  .nmqm-field input{font-size:16px}
  .nmqm-submit{font-size:13px;padding:15px}
}

@media (prefers-reduced-motion:reduce){
  .nmqm-backdrop,.nmqm-card,.nmqm-success,
  .nmqm-success-icon svg circle,.nmqm-success-icon svg path{
    animation:none!important;
  }
}
