/* Patch v2: header micro-interactions + popup curtain (no text changes) */

/* Ensure underline visible */
.head_list_link{
  position: relative;
  display: inline-block;
  transition: color .18s ease;
}
.head_list_link::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-3px;
  height:2px;
  background:#a0282d;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin:left;
  transition: transform .18s ease;
}
.head_list_link:hover::after,
.head_list_link:focus::after{ transform: scaleX(1); }

/* Contact button hover */
.head_feedback_btn{
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  will-change: transform;
}
.head_feedback_btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  filter: brightness(1.02);
}
.head_feedback_btn:active{
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
}

/* Focus ring */
.head_feedback_btn:focus,
.head_list_link:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(160,40,45,.22);
  border-radius: 4px;
}

/* Popups: animated curtain on open/close */
.popup{
  background: transparent !important;
  overflow: hidden;
}

/* Curtain as pseudo-element */
.popup::before{
  content:"";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.60);
  transform: translateY(-100%);
  transition: transform .36s ease;
  will-change: transform;
}

/* Open / closing states */
.popup.is-open::before{ transform: translateY(0); }
.popup.is-closing::before{ transform: translateY(-100%); }

/* Popup content entrance */
.popup .popup_content{
  opacity: 0;
  transform: translateY(-10px) scale(.985);
  transition: opacity .22s ease .10s, transform .22s ease .10s;
  will-change: transform, opacity;
}
.popup.is-open .popup_content{
  opacity: 1;
  transform: translateY(0) scale(1);
}
.popup.is-closing .popup_content{
  opacity: 0;
  transform: translateY(-10px) scale(.985);
}

/* Buttons inside select-method popup */
.popup_select_method .action_btn,
.popup_select_method .messenger_icon{
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.popup_select_method .action_btn:hover,
.popup_select_method .messenger_icon:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.14);
  filter: brightness(1.02);
}
.popup_select_method .action_btn:active,
.popup_select_method .messenger_icon:active{
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
}


/* =========================
   Select-method popup — layout & polish
   (texts unchanged)
   ========================= */

/* Keep popup from covering header: align to top with padding */
#popup_select_method{
  align-items: flex-start !important;
  justify-content: center !important;
  padding-top: 88px; /* visual offset under header */
  padding-left: 14px;
  padding-right: 14px;
  padding-bottom: 24px;
}

/* On small screens, reduce offset a bit */
@media (max-width: 767px){
  #popup_select_method{ padding-top: 68px; }
}

/* Popup card */
#popup_select_method .popup_content{
  width: min(560px, 100%);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  overflow: hidden;
}

/* Header area inside popup */
#popup_select_method .popup_select_method{
  padding: 18px 18px 14px;
  background: #ffffff;
}

/* Title readability */
#popup_select_method .popup_select_method_title{
  color: #444e64;
  letter-spacing: .04em;
}

/* Sections spacing */
#popup_select_method .popup_select_method .line{
  margin: 14px 0;
  opacity: .12;
}

/* Messenger icons grid: consistent spacing */
#popup_select_method .messenger_icons{
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 480px){
  #popup_select_method .messenger_icons{
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Messenger button cards */
#popup_select_method .messenger_icon{
  border-radius: 14px;
  border: 1px solid rgba(68,78,100,.14);
  background: rgba(68,78,100,.03);
  padding: 10px 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}

/* Keep original icon colors if any; just improve interaction */
#popup_select_method .messenger_icon:hover{
  border-color: rgba(160,40,45,.24);
}

/* Action buttons (НАПИСАТЬ / ПОЗВОНИТЬ): make them look modern */
#popup_select_method .action_btn{
  border-radius: 14px;
  border: 1px solid rgba(68,78,100,.14);
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}

/* Make the primary accent clearer without changing text */
#popup_select_method .action_btn:hover{
  border-color: rgba(160,40,45,.28);
}

/* Close button */
#popup_select_method .popup_close{
  transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
  border-radius: 12px;
}
#popup_select_method .popup_close:hover{
  transform: rotate(4deg);
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
}


/* =========================
   Refinement v4
   ========================= */

/* Restore original button look (remove overrides) */
#popup_select_method .action_btn{
  border: initial !important;
  background: initial !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Match rounded corners for inner white card */
#popup_select_method .popup_content{
  border-radius: 18px !important;
}
#popup_select_method .popup_select_method{
  border-radius: 18px !important;
}

/* Apply same layout rules to callback popup */
#popup_recall{
  align-items: flex-start !important;
  justify-content: center !important;
  padding-top: 88px;
  padding-left: 14px;
  padding-right: 14px;
}

@media (max-width: 767px){
  #popup_recall{
    padding-top: 68px;
  }
}

/* Rounded corners for callback popup card */
#popup_recall .popup_content{
  border-radius: 18px !important;
}

/* Explicit personal-data consent in the callback form. */
#popup_recall .privacy-consent {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin: 0 0 16px;
  text-align: left;
}

#popup_recall .privacy-consent input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 2px 10px 0 0;
  padding: 0;
  accent-color: #a0282d;
  cursor: pointer;
}

#popup_recall .privacy-consent input[type="checkbox"] + label {
  position: static;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  color: #333;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  cursor: pointer;
}

#popup_recall .privacy-consent a {
  color: #a0282d;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#popup_recall .privacy-consent a:hover,
#popup_recall .privacy-consent a:focus {
  color: #761d21;
}

#popup_recall .submit_btn:disabled,
#popup_recall .submit_btn[aria-disabled="true"] {
  border-color: #c8cbd1;
  background-color: #c8cbd1;
  color: #737986;
  cursor: not-allowed;
  opacity: .72;
}

#popup_recall .submit_btn:disabled:hover,
#popup_recall .submit_btn[aria-disabled="true"]:hover {
  background-color: #c8cbd1;
  opacity: .72;
}

/* The added privacy link must not push the desktop footer outside its column. */
.wrap_footer_list_menu ul li a.footer_privacy_link {
  font-size: 12px;
}

@media (min-width: 992px) {
  .wrap_footer_list_menu ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 22px;
  }

  .wrap_footer_list_menu ul li {
    margin-left: 0;
  }
}


/* =========================
   Refinement v5 fixes
   ========================= */

/* Inner white block rounded corners */
#popup_select_method .popup_content,
#popup_select_method .popup_select_method{
  border-radius:18px !important;
  overflow:hidden;
}

/* ensure white inner container also rounded */
#popup_select_method .popup_select_method > div{
  border-radius:18px;
}

/* Restore original button look with border and red hover */
#popup_select_method .action_btn{
  border:1px solid #a0282d !important;
  background:#ffffff !important;
  color:#444e64 !important;
  border-radius:6px !important;
  transition:background-color .15s ease,color .15s ease;
}

#popup_select_method .action_btn:hover{
  background:#a0282d !important;
  color:#ffffff !important;
}

/* same behaviour for callback popup */
#popup_recall .action_btn{
  border:1px solid #a0282d !important;
  background:#ffffff !important;
  color:#444e64 !important;
  border-radius:6px !important;
}

#popup_recall .action_btn:hover{
  background:#a0282d !important;
  color:#ffffff !important;
}


/* =========================
   Refinement v6 – inner white block corners fix
   ========================= */

/* The white block inside popup */
#popup_select_method .popup_select_method{
    border-bottom-left-radius:18px !important;
    border-bottom-right-radius:18px !important;
    overflow:hidden;
}

/* ensure header + body look like one rounded card */
#popup_select_method .popup_content{
    border-radius:18px !important;
    overflow:hidden;
}


/* =========================
   Refinement v8 – increase grey frame without breaking layout
   ========================= */

/* make grey card a little larger around white block */
#popup_select_method .popup_content{
  padding-bottom:20px !important;
}

/* create visual spacing between grey header and white body */
#popup_select_method .popup_select_method{
  margin-top:8px;
}

/* small spacing on sides so white corners are less visible */
#popup_select_method .popup_select_method{
  margin-left:10px;
  margin-right:10px;
}

/* keep mobile proportional */
@media (max-width:480px){
  #popup_select_method .popup_select_method{
    margin-left:6px;
    margin-right:6px;
  }
}


/* =========================
   Refinement v9 – header wider than white body
   ========================= */

/* make the white body slightly narrower */
#popup_select_method .popup_select_method{
    margin-left:16px;
    margin-right:16px;
}

/* keep the grey header full width */
#popup_select_method .popup_content{
    padding-bottom:22px;
}

/* mobile adjustment */
@media (max-width:480px){
    #popup_select_method .popup_select_method{
        margin-left:10px;
        margin-right:10px;
    }
}
