/* Попапы с формами, как на лендинге (02.12.2026): белое окно 540 px со скруглением 26 px, метка «Бесплатно»,
   заголовок слева, поля 12 px, бирюзовая кнопка на всю ширину, согласие под кнопкой, ошибка — розовая плашка,
   экран «Готово» — галочка в круге. Разметку попапов (views/popup/*.twig) не меняем; классы eb-form / eb-done ставит eb-popup.js. */
.fancybox-container:has(.order_popup) .fancybox-bg{background:rgba(15,24,37,.6);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
.fancybox-container:has(.order_popup).fancybox-is-open .fancybox-bg{opacity:1}
.fancybox-container:has(.order_popup) .fancybox-slide{padding:24px}

.fancybox-container .order_popup{
  --p-navy:#24364f;--p-ink2:#617083;--p-ink3:#7d8b9a;--p-line:#dbe5ea;--p-bg:#edf4f7;--p-teal:#0ea498;--p-teal-d:#0b8a80;--p-teal-l:#e2f5f3;--p-red:#d64535;
  width:540px;max-width:100%;padding:0!important;border-radius:26px!important;background:#fff;overflow:hidden;text-align:left;
  font-family:Golos,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--p-navy);box-shadow:0 30px 60px -28px rgba(0,0,0,.45)}
.order_popup *,.order_popup *::before,.order_popup *::after{box-sizing:border-box}
.fancybox-container .order_popup .popup-box{
  display:flex;flex-wrap:wrap;gap:10px;max-width:none;width:auto;padding:30px 30px 26px;background:#fff;text-align:left}
.order_popup .popup-box > *{flex:1 1 100%;min-width:0;margin:0}
.order_popup .popup-box > br,.order_popup .popup-box > figure{display:none}

/* метка «Бесплатно» */
.order_popup.eb-form .popup-box::before{content:"Бесплатно";order:-2;flex:0 0 auto;display:inline-block;padding:6px 12px;border-radius:99px;background:var(--p-teal-l);color:#08776e;font-size:12.5px;font-weight:700;line-height:1.2}
.order_popup.eb-form .popup-box::after{content:"";order:-2;flex:1 1 60%}

/* заголовок и текст */
.fancybox-container .order_popup .popup-box h3{order:-1;font-size:26px;font-weight:800;letter-spacing:-.025em;line-height:1.15;color:var(--p-navy);text-align:left;margin:4px 0 0;padding-right:40px}
.order_popup .popup-box h3 span{font-size:inherit!important}
.order_popup .popup-box > h3 + p,.order_popup .popup-box > p:not(.eb-err){order:-1;color:var(--p-ink2);font-size:15.5px;line-height:1.45;text-align:left;margin:0 0 6px}

/* поля: имя и телефон в один ряд на компьютере */
.order_popup.eb-form .form-block_row{flex:1 1 200px;margin:0!important;width:auto}
.order_popup .form-block_inp{margin:0}
.order_popup .form-block_inp input{
  display:block;width:100%;height:auto;margin:0;padding:14px 16px!important;border:1.5px solid var(--p-line)!important;border-radius:12px!important;
  background:#fff;color:var(--p-navy);font-family:inherit;font-size:16px;font-weight:500;line-height:1.3;box-shadow:none;outline:none;transition:border-color .15s}
.order_popup .form-block_inp input::placeholder{color:#8a97a5;opacity:1}
.order_popup .form-block_inp input:focus{border-color:var(--p-teal)!important}
.order_popup .form-block_inp.error input{border-color:var(--p-red)!important}
.order_popup .form-block_hint:empty,.order_popup.eb-form .form-block_hint{display:none}

/* окно открыто чёрной кнопкой (карточки проектов) — кнопка отправки тоже чёрная */
.fancybox-container .order_popup.eb-dark .popup-box > .btn-green{background:#1b1b1b!important;color:#fff!important}
@media (hover:hover){.fancybox-container .order_popup.eb-dark .popup-box > .btn-green:hover{background:#000!important}}
/* кнопка на всю ширину, согласие под ней */
.fancybox-container .order_popup .popup-box > .btn-green{order:5;width:100%!important;margin:6px 0 0!important;padding:17px 28px!important;font-size:16px!important;border-radius:12px!important}
.order_popup .form-block_agree{order:6;margin:2px 0 0!important}
.order_popup .check-unit.ecobrus-consent{justify-content:flex-start;gap:8px;font-size:12.5px;line-height:1.4;color:var(--p-ink3);cursor:pointer}
.order_popup .check-unit.ecobrus-consent > span{flex:0 0 16px;width:16px;height:16px;margin:1px 0 0;border-radius:4px;cursor:pointer;position:relative}
.order_popup .check-unit.ecobrus-consent > span::before{width:16px;height:16px;border:1.5px solid #9aa8b5;border-radius:4px;background:#fff;position:absolute;content:""}
.order_popup .check-unit.ecobrus-consent > span.active::before{border-color:var(--p-teal);background:var(--p-teal)}
.order_popup .check-unit.ecobrus-consent > span::after{display:none}
.order_popup .check-unit.ecobrus-consent > span.active::after{display:block;content:"";position:absolute;width:9px;height:5px;top:4px;left:3.5px;border:solid #fff;border-width:0 0 2px 2px;transform:rotate(-45deg)}
.order_popup .check-unit.ecobrus-consent > span:focus-visible{outline:3px solid #00867b;outline-offset:2px}
.order_popup .check-unit.eb-bad{color:var(--p-red)}
.order_popup .check-unit.eb-bad > span::before{border-color:var(--p-red)}
.order_popup .ecobrus-consent-text a{color:inherit;text-decoration:underline;text-underline-offset:2px}

/* ошибка */
.order_popup .eb-err{order:7;margin:4px 0 0!important;padding:10px 14px;border-radius:10px;background:#fdebe9;color:#b4362c;font-size:14px;font-weight:600;line-height:1.4;text-align:left}
.order_popup .eb-err a{color:inherit;text-decoration:underline;text-underline-offset:2px;font-weight:800}

/* экран «Готово» */
.order_popup.eb-done .popup-box{flex-direction:column;align-items:center;text-align:center;gap:12px;padding:40px 30px 30px}
.order_popup.eb-done .popup-box > *{flex:0 0 auto}
.order_popup .eb-ok{width:60px;height:60px;border-radius:50%;background:var(--p-teal-l);display:grid;place-items:center;position:relative}
.order_popup .eb-ok::after{content:"";width:22px;height:12px;margin-top:-5px;border:solid #087b73;border-width:0 0 3px 3px;transform:rotate(-45deg)}
.fancybox-container .order_popup.eb-done .popup-box h3{order:0;font-size:24px;text-align:center;padding:0;margin:0}
.order_popup.eb-done .popup-box > p:not(.eb-err){order:0;text-align:center;max-width:400px;margin:0}
.fancybox-container .order_popup.eb-done .popup-box > .btn-green{order:0;width:auto!important;min-width:200px;margin-top:8px!important;padding:15px 28px!important;font-size:15px!important;
  background:#fff!important;color:var(--p-navy)!important;box-shadow:inset 0 0 0 1.5px var(--p-line)!important}
@media (hover:hover){.fancybox-container .order_popup.eb-done .popup-box > .btn-green:hover{box-shadow:inset 0 0 0 1.5px var(--p-teal)!important;color:var(--p-teal-d)!important;background:#fff!important}}

/* кнопка закрытия — как на лендинге */
.fancybox-container .order_popup .fancybox-close-small{
  right:14px;top:14px;width:44px;height:44px;padding:0;border-radius:14px;background:rgba(255,255,255,.95);
  box-shadow:0 4px 14px -6px rgba(15,24,37,.35);opacity:1}
.fancybox-container .order_popup .fancybox-close-small::before{display:none}
.fancybox-container .order_popup .fancybox-close-small::after{content:"";display:block;position:absolute;inset:0;margin:auto;width:18px;height:18px;border:0;border-radius:0;background:var(--p-navy);color:transparent;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center/contain no-repeat}
.fancybox-container .order_popup .fancybox-close-small:hover::after{background:var(--p-teal-d)}
.fancybox-container .order_popup .fancybox-close-small:focus-visible{outline:3px solid #00867b;outline-offset:2px}

@media (max-width:720px){
  .fancybox-container:has(.order_popup) .fancybox-slide{padding:16px}
  .fancybox-container .order_popup{border-radius:22px!important}
  .fancybox-container .order_popup .popup-box{padding:24px 18px 20px}
  .fancybox-container .order_popup .popup-box h3{font-size:22px}
  .order_popup .popup-box > h3 + p,.order_popup .popup-box > p:not(.eb-err){font-size:15px}
  .fancybox-container .order_popup .fancybox-close-small{right:10px;top:10px;width:40px;height:40px}
}
