/* ===== Протокол24 — legal mobile header/footer match v1.5 ===== */

/* Burger for legal pages */
.p24-legal-burger-v15 {
  display: none;
}

/* Подвал на десктопе оставляем близко к главной */
body.p24-legal-v13-body .p24-legal-footer-contacts-v13 {
  align-items: flex-end !important;
}

@media (max-width: 900px) {
  /*
    Mobile header: как на главной.
    Слева бренд, справа бургер.
  */
  body.p24-legal-v13-body .p24-legal-topbar-v13 {
    display: none !important;
  }

  body.p24-legal-v13-body .p24-legal-header-v13 {
    background: #fff !important;
    border-bottom: 1px solid #dce7f7 !important;
    box-shadow: 0 10px 30px rgba(16,35,79,.03) !important;
  }

  body.p24-legal-v13-body .p24-legal-header-inner-v13 {
    width: 100% !important;
    min-height: 84px !important;
    padding: 0 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  body.p24-legal-v13-body .p24-legal-brand-v13 {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #10234f !important;
    text-decoration: none !important;
    min-width: 0 !important;
  }

  body.p24-legal-v13-body .p24-legal-brand-logo-v13 {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    box-shadow: 0 10px 24px rgba(21,93,252,.22) !important;
  }

  body.p24-legal-v13-body .p24-legal-brand-text-v13 {
    display: inline-block !important;
    color: #10234f !important;
    font-size: 21px !important;
    line-height: 1 !important;
    font-weight: 950 !important;
    letter-spacing: -.035em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.p24-legal-v13-body .p24-legal-nav-v13,
  body.p24-legal-v13-body .p24-legal-header-actions-v13 {
    display: none !important;
  }

  body.p24-legal-v13-body .p24-legal-burger-v15 {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    border-radius: 16px !important;
    border: 1px solid #dce7f7 !important;
    background: #fff !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    margin-left: auto !important;
    box-shadow: 0 10px 26px rgba(16,35,79,.06) !important;
    cursor: pointer !important;
  }

  body.p24-legal-v13-body .p24-legal-burger-v15 span {
    width: 18px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: #10234f !important;
    display: block !important;
  }

  /*
    Mobile legal document nav: как на главной карточной логике, без "ломаной" шапки.
  */
  body.p24-legal-v13-body .p24-legal-doc-nav-v13 {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-bottom: 24px !important;
  }

  body.p24-legal-v13-body .p24-legal-doc-nav-v13 a {
    min-height: 46px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
  }

  body.p24-legal-v13-body .p24-legal-doc-nav-v13 a.is-active {
    background: #155dfc !important;
    color: #fff !important;
    border-color: #155dfc !important;
  }

  /*
    Mobile footer: как на главной.
    Лого/описание, копирайт, контакты отдельными строками,
    мессенджеры в белой карточке.
  */
  body.p24-legal-v13-body .p24-legal-footer-v13 {
    background: #f1f6ff !important;
    border-top: 1px solid #dce7f7 !important;
    padding: 36px 10px 38px !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-inner-v13 {
    width: 100% !important;
    max-width: 390px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 22px !important;
    text-align: center !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-inner-v13 > div {
    width: 100% !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-brand-v13 {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 21px !important;
    color: #10234f !important;
    text-decoration: none !important;
    font-weight: 950 !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-v13 .p24-legal-brand-logo-v13 {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 10px !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-v13 p {
    max-width: 300px !important;
    margin: 10px auto 0 !important;
    color: #607091 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-center-v13 {
    text-align: center !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-center-v13 strong {
    display: block !important;
    color: #10234f !important;
    font-size: 15px !important;
    font-weight: 950 !important;
    margin-bottom: 8px !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-center-v13 p {
    margin-top: 0 !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-contacts-v13 {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 14px !important;
    justify-self: center !important;
    text-align: center !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-contact-line-v14 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    color: #10234f !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
    font-weight: 950 !important;
    white-space: normal !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-contact-line-v14 span {
    display: none !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-contact-line-v14 a {
    color: #10234f !important;
    text-decoration: none !important;
    font-size: 18px !important;
    font-weight: 950 !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-messengers-v14 {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    background: #fff !important;
    border: 1px solid #dce7f7 !important;
    border-radius: 22px !important;
    padding: 44px 16px 18px !important;
    box-shadow: 0 18px 48px rgba(16,35,79,.08) !important;
    position: relative !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-messengers-title-v14 {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 16px !important;
    text-align: center !important;
    color: #155dfc !important;
    font-size: 13px !important;
    line-height: 1 !important;
    font-weight: 950 !important;
    text-transform: uppercase !important;
    letter-spacing: .08em !important;
    margin: 0 !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-msg-btn-v14 {
    min-height: 44px !important;
    width: 100% !important;
    padding: 0 8px !important;
    border-radius: 13px !important;
    background: #fff !important;
    border: 1px solid #dce7f7 !important;
    color: #155dfc !important;
    font-size: 14px !important;
    font-weight: 950 !important;
    box-shadow: 0 8px 18px rgba(16,35,79,.04) !important;
  }
}

@media (max-width: 380px) {
  body.p24-legal-v13-body .p24-legal-header-inner-v13 {
    padding: 0 18px !important;
  }

  body.p24-legal-v13-body .p24-legal-brand-text-v13 {
    font-size: 19px !important;
    max-width: 160px !important;
  }

  body.p24-legal-v13-body .p24-legal-footer-messengers-v14 {
    grid-template-columns: 1fr !important;
  }
}