/* Shared lead forms and dialogs. */
.foot-bottom .foot-policy{max-width:100%;color:inherit;line-height:1.45;text-decoration:underline;text-underline-offset:3px}
.foot-bottom .foot-policy:hover{color:var(--white,#fff)}
.foot-bottom .foot-policy:focus-visible{outline:2px solid currentColor;outline-offset:4px}
.b24-form-field-agreement a.b24-form-field-agreement-link{color:var(--accent,#7927e0);text-decoration:underline;text-underline-offset:2px}
/* A dialog locks the page scroll and its scrollbar disappears: the page and
   the fixed header are padded by the scrollbar width (--lead-scrollbar, set
   by lead-forms.js on open) so the layout does not jump. */
html.lead-modal-open{overflow:hidden;padding-right:var(--lead-scrollbar,0px)}
html.lead-modal-open header.head{right:var(--lead-scrollbar,0px)}
.lead-dialog{box-sizing:border-box;width:min(600px,calc(100% - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:40px;border:0;border-radius:24px;background:var(--lilac,#f2efff);color:var(--ink,#222);overflow:auto;overscroll-behavior:contain}
.lead-dialog::backdrop{background:rgba(20,16,40,.55);backdrop-filter:blur(4px)}
.lead-dialog h2{margin:0 40px 12px 0;font-size:clamp(24px,4vw,32px);line-height:1.2}
.lead-dialog-intro{margin:0 0 24px;line-height:1.5;color:var(--ink-soft,#585466)}
.lead-dialog-close{appearance:none;-webkit-appearance:none;position:absolute;right:16px;top:12px;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font-size:0;box-shadow:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.lead-dialog-close::before,.lead-dialog-close::after{content:'';position:absolute;width:22px;height:2px;background:currentColor;transform:rotate(45deg);pointer-events:none}
.lead-dialog-close::after{transform:rotate(-45deg)}
.lead-dialog-close:hover,.lead-dialog-close:active{background:transparent}
.lead-dialog-close:focus-visible{outline:2px solid var(--accent,#7927e0);outline-offset:2px}
.lead-dialog form:where([data-endpoint]){display:flex;flex-direction:column;gap:18px}
.lead-dialog .field{display:flex;flex-direction:column;gap:8px}
.lead-dialog :where(form[data-endpoint]) label{font-size:14px;font-weight:500}
.lead-dialog :where(form[data-endpoint]) :is(input,textarea){box-sizing:border-box;width:100%;min-width:0;border:1px solid transparent;border-radius:10px;background:#fff;color:inherit;font:inherit;padding:14px 16px}
.lead-dialog .sel-native{width:1px;height:1px;padding:0}
.lead-dialog .sel.is-up .sel-pop{top:auto;bottom:calc(100% + 8px)}
.lead-dialog :where(form[data-endpoint]) textarea{min-height:100px;resize:vertical}
.lead-dialog :where(form[data-endpoint]) :is(input,textarea,select):focus{outline:2px solid var(--accent,#6654e8);outline-offset:2px}
.lead-dialog .field.err :is(input,textarea,select){border-color:var(--red,#c42b43)}
.lead-dialog .hint{display:none;font-size:13px;color:var(--red,#c42b43)}
.lead-dialog .field.err .hint{display:block}
.lead-dialog .note{margin:0;font-size:13px;line-height:1.5;color:var(--ink-soft,#585466)}
.lead-dialog .lead-err{display:none;margin:0;font-size:14px;line-height:1.5;color:var(--red,#c42b43)}
.lead-dialog .failed .lead-err{display:block}
.lead-dialog .lead-ok{display:none;line-height:1.5}
.lead-dialog .sent .lead-ok{display:block}
.lead-dialog .sent :is(.field,.btn,.note){display:none}
.lead-dialog .btn{align-self:flex-start}
form[data-endpoint] button[aria-busy=true]{opacity:.65;cursor:wait}
.lead-inline-card{padding:32px;border-radius:24px;background:var(--lilac,#f2efff)}
.lead-inline-card.lead-form{grid-column:7 / span 6;min-width:0}
.lead-inline-card :is(input,textarea,select){min-width:0;max-width:100%}
.lead-inline-card h3{margin-top:0}
.lead-entry-single{max-width:800px;margin:auto}
@media(max-width:1100px){.lead-inline-card.lead-form{grid-column:1 / -1}}
@media(max-width:600px){.lead-dialog{padding:28px 20px;border-radius:20px}.lead-dialog .btn{width:100%;justify-content:center}.lead-inline-card{padding:24px}}

/* Bitrix24 CRM form in .lead-b24: the project dialog and the open
   "Доверьте нам свой проект" form ([data-lead-b24], mounted by lead-forms.js)
   and forms embedded straight into a lilac .lead-form card (B2B media plan).
   Fields, texts and colours are set in the Bitrix24 form editor; these rules
   fit its markup to the site: no inner paddings, rounded fields, a pill
   button, site errors. */
.lead-b24{min-height:440px}
.lead-b24:has(.b24-form){min-height:0}
/* Contact line shown by lead-forms.js when the Bitrix24 form does not render. */
.b24-fallback{margin:0;font-size:15px;line-height:1.5;color:var(--ink,#222)}
.b24-fallback a{color:var(--accent,#7927e0);text-decoration:underline}
:has(.b24-form)>.b24-fallback{display:none}
.lead-b24 :is(.b24-form-header-padding,.b24-form-sign){display:none}
.lead-b24 :is(.b24-form-content,.b24-form-padding-side){padding-left:0;padding-right:0}
.lead-b24 .b24-form-content{padding-top:0;padding-bottom:0}
.lead-b24 .b24-form-field{margin-bottom:16px}
.lead-b24 :is(.b24-form-control-string,.b24-form-control-list,.b24-form-control-text) .b24-form-control{border-radius:8px;padding:17px 16px 0;background-color:#fff;letter-spacing:0}
.lead-b24 .b24-form-control-text .b24-form-control{padding-top:23px}
.lead-b24 :is(.b24-form-control-string,.b24-form-control-list,.b24-form-control-text) .b24-form-control:focus{border-color:var(--accent,#7927e0)}
/* The error text below a field lengthens its block, so the floating label is
   centred on the 52px field itself instead of the whole block. */
.lead-b24 :is(.b24-form-control-string,.b24-form-control-list,.b24-form-control-text) .b24-form-control-label{top:26px;padding-left:17px}
.lead-b24 :is(.b24-form-control-string,.b24-form-control-list,.b24-form-control-text) :is(.b24-form-control:focus,.b24-form-control-not-empty)+.b24-form-control-label{top:8px}
/* A field hint ("Продукт, аудитория, сроки") in the site's muted caption style. */
.lead-b24 .b24-form-control-comment{padding-top:4px;font-size:13px;line-height:1.4;color:var(--ink-soft,#585466)}
.lead-b24 .b24-form-field-agreement .b24-form-control-container{font-size:13px;line-height:1.4}
.lead-b24 .b24-form-field-agreement .b24-form-control-desc{font-size:13px;line-height:1.4;opacity:1;color:var(--ink-soft,#585466)}
.lead-b24 .b24-form-btn{width:auto;min-height:48px;padding:12px 24px;border-radius:32px;font-weight:400;font-size:16px;line-height:1.3}
.lead-b24 .b24-form-btn:hover{background-color:var(--indigo-bright,#9d5ded)}
.lead-b24 .b24-form-control-alert{margin-bottom:16px!important}
.lead-b24 .b24-form-control-alert:is(.b24-form-control-string,.b24-form-control-list,.b24-form-control-text) .b24-form-control{background-color:#fff;border-color:var(--red,#c42b43)}
.lead-b24 .b24-form-control-alert-message{position:static;max-width:none;padding:8px 0 0;border-radius:0;background:none;font-size:13px;line-height:1.4;color:var(--red,#c42b43)}
.lead-b24 .b24-form-control-alert-message::before,.lead-b24 .b24-form-control-alert-message::after{display:none}
/* Loading, success and error screens cover the form: card colour instead of
   Bitrix24's green and red plates, a site-coloured check icon. */
.lead-b24 .b24-form-state-container :is(.b24-form-loader,.b24-form-state){border-radius:0;background-color:var(--lilac,#f2efff)}
.lead-b24 .b24-form-success-icon{width:72px;height:72px;margin:0 0 24px;background-size:contain;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 72'%3E%3Ccircle cx='36' cy='36' r='36' fill='%237927E0'/%3E%3Cpath d='M23 37l9 9 17-19' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.lead-b24 .b24-form-error-icon{display:none}
.lead-b24 .b24-form-state-text{font-size:17px;line-height:1.4;opacity:1;color:var(--ink,#222)}
.lead-b24 .b24-form-error .b24-form-state-text{color:var(--red,#c42b43)}
/* The retry button is white on Bitrix24's red plate; on the card it needs the accent. */
.lead-b24 .b24-form-state-container .b24-form-error .b24-form-btn{color:var(--accent,#7927e0);border-color:var(--accent,#7927e0)}
.lead-b24 .b24-form-state-container .b24-form-error .b24-form-btn:hover{background-color:var(--accent,#7927e0);color:#fff}
@media(max-width:600px){.lead-b24 .b24-form-btn{width:100%}}

/* Shared CRM controls, including service forms with their own card wrappers.
   Keep Bitrix24's fields, dropdowns and reactive values; only restore the
   site's former .sel palette, spacing and geometry. Higher specificity also
   keeps these rules stable when the CRM stylesheet loads after this file. */
body .b24-form .b24-form-control-container{min-width:0}
body .b24-form .b24-form-btn-container{margin-left:0;margin-right:0}
body .b24-form .b24-form-btn-block{min-width:0;padding-left:0;padding-right:0}
body .b24-form .b24-form-control-list .b24-form-control{border-radius:var(--r-s,8px);padding-right:72px;cursor:pointer;letter-spacing:0}
body .b24-form .b24-form-control-list .b24-form-control-label{padding-right:72px}
body .b24-form .b24-form-control-list .b24-form-control-container:after{top:26px;right:16px;width:7px;height:7px;border-width:0 1.5px 1.5px 0;color:var(--ink-soft,#585466);border-color:currentColor;opacity:1;pointer-events:none}
body .b24-form .b24-form-control-list:has(.b24-form-dropdown-container) .b24-form-control-container:after{transform:translate(-50%,-50%) rotate(225deg);color:var(--accent,#7927e0)}
body .b24-form .b24-form-control-list .b24-form-icon-remove{right:36px;width:32px;height:52px;top:0}
body .b24-form .b24-form-icon-before,body .b24-form .b24-form-icon-after{align-items:center;justify-content:center;flex-shrink:0}
body .b24-form .b24-form-control-container.b24-form-control-icon-before .b24-form-control,
body .b24-form .b24-form-control-icon-before .b24-form-control-label{padding-left:36px}
body .b24-form .b24-form-dropdown-container{padding:8px;border:1px solid var(--line,#d2d3dd);border-radius:var(--r-m,16px);background:var(--white,#fff);box-shadow:0 18px 44px rgba(30,30,30,.14);scrollbar-width:thin;scrollbar-color:var(--ink,#222) var(--cold,#edf0fd);overscroll-behavior:contain}
body .b24-form .b24-form-control-list-selector-item{min-height:52px;padding:16px;border:0;border-radius:var(--r-s,8px);background:var(--white,#fff);transition:background .15s ease,color .15s ease}
body .b24-form .b24-form-control-list-selector-item-title{font-family:Geologica,'Segoe UI',system-ui,sans-serif;font-size:16px;font-weight:300;line-height:20px;letter-spacing:0;color:var(--ink,#222);white-space:normal}
body .b24-form .b24-form-control-list-selector-item:hover,
body .b24-form .b24-form-control-list-selector-item:focus-within{background:var(--accent,#7927e0);opacity:1}
body .b24-form .b24-form-control-list-selector-item:hover .b24-form-control-list-selector-item-title,
body .b24-form .b24-form-control-list-selector-item:focus-within .b24-form-control-list-selector-item-title{color:#fff}
body .b24-form .b24-form-dropdown-header .b24-window-close{top:8px;right:8px;width:40px;height:40px;background:transparent;opacity:1}
body .b24-form .b24-form-dropdown-header .b24-window-close:before,
body .b24-form .b24-form-dropdown-header .b24-window-close:after{width:1.5px;height:16px;background:var(--ink,#222)}
body .b24-form .b24-form-dropdown-header .b24-window-close:focus-visible{outline:2px solid var(--accent,#7927e0);outline-offset:2px}
/* Align the consent box with the first text line, even when the label wraps. */
body .b24-form .b24-form-field-agreement .b24-form-control-container{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;font-size:13px;line-height:1.5}
body .b24-form .b24-form-field-agreement input[type=checkbox]{appearance:none;-webkit-appearance:none;box-sizing:border-box;flex:0 0 18px;width:18px;height:18px;margin:1px 0 0;padding:0;border:1px solid var(--steel,#a5a8c1);border-radius:4px;background:#fff;cursor:pointer;accent-color:var(--accent,#7927e0)}
body .b24-form .b24-form-field-agreement input[type=checkbox]:checked{border-color:var(--accent,#7927e0);background:var(--accent,#7927e0) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m4 9 3 3 7-7' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat}
body .b24-form .b24-form-field-agreement input[type=checkbox]:focus-visible{outline:2px solid var(--accent,#7927e0);outline-offset:3px}
body .b24-form .b24-form-field-agreement .b24-form-control-desc{flex:1;min-width:0;margin:0;font:inherit;color:var(--ink-soft,#585466);opacity:1}
body .b24-form .b24-form-field-agreement .b24-form-control-alert-message{flex:0 0 100%;width:100%;max-width:none;margin:0}
body .b24-form .b24-form-field-agreement a.b24-form-field-agreement-link{font:inherit;color:var(--accent,#7927e0);text-decoration:underline;text-underline-offset:2px}
@media(min-width:521px){body .b24-form .b24-form-control-list .b24-form-dropdown-container{margin-top:8px!important;max-height:204px}}
@media(max-width:520px){body .b24-form .b24-form-dropdown-container{border-radius:20px 20px 0 0;padding:8px 8px max(8px,env(safe-area-inset-bottom));min-height:0;max-height:70dvh}body .b24-form .b24-form-dropdown-title{font-family:Geologica,'Segoe UI',system-ui,sans-serif;font-size:18px;line-height:1.4}}
@media(max-width:600px){body .b24-form .b24-form-control:not(:focus):not(.b24-form-control-not-empty)+.b24-form-control-label{white-space:normal;max-height:36px;line-height:18px}}

.tender-entry{display:flex;margin-top:24px}
/* Form 37 uses the same dialog surface and controls as the other CRM forms. */
#tender-dialog .b24-form-wrapper{background:transparent;box-shadow:none}
#tender-dialog .b24-form-header{display:none}
#tender-dialog .b24-form-btn{max-width:100%;white-space:normal;line-height:1.3;text-wrap:balance}
#tender-dialog .b24-form :is(input,textarea):focus{outline:none;box-shadow:none;border-color:var(--accent,#7927e0)}
#tender-dialog .b24-form-control-file{padding:12px 16px;border:1px solid transparent;border-radius:8px;background:#fff}
#tender-dialog .b24-form-control-file .b24-form-control-label{position:static;transform:none;padding:0;margin-bottom:8px;font-size:13px;line-height:1.4;color:var(--ink-soft,#585466)}
#tender-dialog .b24-form-control-file label.b24-form-control{min-height:32px;padding:4px 0;border:0;background:transparent;color:var(--accent,#7927e0);font-family:Geologica,'Segoe UI',system-ui,sans-serif;font-size:15px;font-weight:400}

.wp-contact-error{padding-top:8px;color:var(--red,#c42b43);font-size:13px;line-height:1.4}
.wp-contact-error[hidden]{display:none}
.b24-form input[aria-invalid=true]{border-color:var(--red,#c42b43)!important}
/* Long floating labels need their own space above a filled value. */
@media(max-width:600px){
  body .b24-form .wp-long-label .b24-form-control-container{display:flex;flex-direction:column}
  body .b24-form .wp-long-label .b24-form-control{min-height:52px;padding:14px 16px}
  body .b24-form .wp-long-label .b24-form-control-label{position:static!important;order:-1;transform:none!important;white-space:normal!important;max-height:none!important;height:auto!important;line-height:20px!important;font-size:14px!important;padding:0!important;margin:0 0 8px;overflow:visible!important}
}
