/* Contact links keep their responsive layout and native call or form action.
   The layer gives their colour precedence over legacy per-section !important rules. */
@layer vp-contact {
  :root {
    --vp-contact-color: linear-gradient(115deg, #e9483d, #c84234 55%, #f45a45);
    --vp-contact-hover: #c63e31;
    --vp-contact-pressed: #ad332a;
    --vp-contact-focus: #77281f;
    --vp-contact-label: #fff;
    --vp-contact-shadow: rgb(117 44 36 / 18%);
  }

  :is([data-vp-contact-button], .vp-partner-cta, .vpc-number, .vpc-dial, #vp-submit) {
    --vp-button-fill: var(--vp-contact-color);
    background: var(--vp-button-fill) !important;
    border-color: rgb(255 255 255 / 70%) !important;
    border-radius: var(--vp-contact-radius, 14px) !important;
    color: var(--vp-contact-label) !important;
    -webkit-text-fill-color: var(--vp-contact-label) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: var(--vp-contact-elevation, 0 3px 10px var(--vp-contact-shadow)) !important;
    animation: none !important;
    transition: background-color .15s, border-color .15s, box-shadow .15s !important;
  }

  @media (hover: hover) {
    :is([data-vp-contact-button], .vp-partner-cta, .vpc-number, .vpc-dial, #vp-submit):not(:disabled):hover {
      --vp-button-fill: var(--vp-contact-hover);
    }
  }

  :is([data-vp-contact-button], .vp-partner-cta, .vpc-number, .vpc-dial, #vp-submit):not(:disabled):active {
    --vp-button-fill: var(--vp-contact-pressed);
  }

  :is([data-vp-contact-button], .vp-partner-cta, .vpc-number, .vpc-dial, #vp-submit):focus-visible {
    outline: 3px solid var(--vp-contact-focus) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 3px white !important;
  }

  :is([data-vp-contact-button], .vp-partner-cta, .vpc-number, .vpc-dial, #vp-submit) :is(span, i, svg) {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
  }

  :is([data-vp-form], .main-call-btn, .mobile-header-phone, .desktop-action-measure,
      .contact-btn, .price-btn, .product-action, .pvh-compare-cta, .area-cta[data-ac-title],
      [data-vp-contact-button][href^="/zayavka"], .vp-partner-cta:not([href^="tel:"]), #vp-submit) {
    --vp-contact-color: linear-gradient(115deg, #4a9940, #357d35 55%, #55a749);
    --vp-contact-hover: #397f34;
    --vp-contact-pressed: #2c682b;
    --vp-contact-focus: #245725;
    --vp-contact-shadow: rgb(62 132 44 / 23%);
  }
  @media (min-width: 992px) {
    .desktop-action-bar .desktop-action {
      --vp-contact-color: linear-gradient(120deg, #f43f38, #ff664a) !important;
      --vp-contact-shadow: rgb(211 62 39 / 26%);
      --vp-contact-radius: 22px;
      --vp-contact-elevation: 0 11px 26px var(--vp-contact-shadow);
    }
    .desktop-action-bar .desktop-action-measure {
      --vp-contact-color: linear-gradient(120deg, #64bc45, #4caf50) !important;
      --vp-contact-shadow: rgb(65 130 43 / 24%);
    }
    .desktop-action-bar .desktop-action-icon {
      border: 1px solid rgb(255 255 255 / 50%) !important;
      border-radius: 50% !important;
      background: rgb(255 255 255 / 17%) !important;
    }
    .desktop-action-bar .desktop-action-text { font-size: 19px; }
  }

  @media (max-width: 768px) {
    .navbar.top-head .nav-phone, .cta-link:has(.vp-call-mobile) {
      --vp-contact-color: #397f34;
      --vp-contact-hover: #327330;
      --vp-contact-pressed: #2c682b;
    }
    #mobile-call-button .mobile-action-call {
      --vp-contact-color: #a4e887;
      --vp-contact-hover: #94da76;
      --vp-contact-pressed: #84cc66;
      --vp-contact-label: #16391f;
      --vp-contact-focus: #28572f;
      --vp-contact-shadow: rgb(30 80 39 / 22%);
    }
    #mobile-call-button .mobile-action-call > .fa {
      border-color: rgb(22 57 31 / 33%) !important;
      background-color: rgb(22 57 31 / 6%) !important;
    }
  }

  .top-head .vp-services summary .fa { color: #65b549 !important; }
  .top-head .vp-area-pin {
    color: #438336 !important;
    background-color: #f1faec !important;
    border-color: #afd69e !important;
  }
  .top-head .navbar-toggle {
    color: #16391f !important;
    background: #a4e887 !important;
    border-color: #91d576 !important;
  }
  .top-head .navbar-toggle .icon-bar { background-color: #16391f !important; }

  /* The theme's shine and pulsing rings appear on top of the button surface. */
  :is([data-vp-contact-button], .vp-partner-cta)::before,
  :is([data-vp-contact-button], .vp-partner-cta)::after,
  :is([data-vp-contact-button], .vp-partner-cta, .vpc-number, .vpc-dial, #vp-submit) .ac-motion-layer {
    display: none !important;
  }

  #vp-submit:disabled { opacity: .65; }

  @media (prefers-reduced-motion: reduce) {
    :is([data-vp-contact-button], .vp-partner-cta, .vpc-number, .vpc-dial, #vp-submit) { transition: none !important; }
  }
}
