/* One mobile structure; JavaScript enhances the existing canonical PC links. */
.md-footer-wechat-modal[hidden] { display: none !important; }
@media (width >= 1024px) {
  .md-site .md-medical-footer__social .md-footer-redbook-link { display: none; }
}
@media (width < 1024px) {
  body.md-footer-wechat-modal-open {
    position: fixed; top: var(--md-footer-modal-lock-top, 0); right: 0; left: var(--md-footer-modal-lock-left, 0);
    width: 100%; overflow: hidden; overscroll-behavior: none;
  }
  .md-footer-wechat-modal {
    position: fixed; z-index: 100100; inset: 0;
    display: flex; width: 100%; min-width: 0; min-height: 100vh; min-height: 100dvh;
    padding: 24px; box-sizing: border-box; align-items: center; justify-content: center;
    background: rgba(51,51,51,.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    overscroll-behavior: contain;
  }
  .md-footer-wechat-modal *,
  .md-footer-wechat-modal *::before,
  .md-footer-wechat-modal *::after { box-sizing: border-box; }
  .md-footer-wechat-modal__close {
    position: fixed; z-index: 2;
    top: max(17.5px, env(safe-area-inset-top)); right: max(17.5px, env(safe-area-inset-right));
    display: flex; width: 44px; height: 44px; margin: 0; padding: 0;
    border: 0; border-radius: 50%; background: transparent; box-shadow: none;
    -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
    align-items: center; justify-content: center; cursor: pointer;
  }
  button.md-footer-wechat-modal__close:is(:hover, :focus, :active) {
    border: 0; background: transparent; box-shadow: none; color: inherit;
  }
  button.md-footer-wechat-modal__close:focus:not(:focus-visible) { outline: none; }
  .md-footer-wechat-modal__close img { display: block; width: 31px; height: 31px; }
  .md-footer-wechat-modal__card {
    display: flex; flex: 0 0 auto; width: 200px; height: 240px; padding: 17px 16.5px 19px;
    border-radius: 16.667px / 20px; background: #fff;
    flex-direction: column; align-items: center; transform: translateY(-3px);
  }
  .md-footer-wechat-modal__qr {
    display: block; flex: 0 0 auto; width: 167px; height: 167px; margin: 0; object-fit: cover;
    -webkit-touch-callout: default;
  }
  .md-footer-wechat-modal__card p {
    margin: 22px 0 0; color: #666; font-family: var(--md-font-medium);
    font-size: 10px; font-weight: 400; line-height: normal; white-space: nowrap;
  }
  button.md-footer-wechat-modal__close:focus-visible { outline: 2px solid #ffd100; outline-offset: 2px; }
  .md-site .md-footer-social--redbook-link [aria-controls="md-footer-redbook-qr"] { display: none; }
  .md-site .md-medical-footer__column a.md-footer-redbook-link {
    display: flex; width: 44px; height: 44px; margin: 0; padding: 0;
    align-items: center; justify-content: flex-start;
  }
  .md-site .md-medical-footer {
    width: 100%; height: auto; min-width: 0; min-height: 0; margin: 0;
    margin-top: auto !important;
    padding: 32px max(var(--md-mobile-gutter), env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(var(--md-mobile-gutter), env(safe-area-inset-left));
    box-sizing: border-box; background: #f5f5f7;
  }
  .md-site .md-medical-footer .md-medical-shell {
    position: relative;
    width: 100%; height: auto; min-width: 0; margin: 0; padding: 0;
  }
  .md-site .md-medical-footer__directory {
    position: static; display: flex;
    width: 100%; height: auto; margin: 0; padding: 0;
    flex-direction: column; gap: 0;
  }
  .md-site .md-medical-footer__column,
  .md-site .md-medical-footer__column > section {
    width: 100%; margin: 0; padding: 0; align-items: stretch;
  }
  .md-site .md-medical-footer__column--partnerships,
  .md-site .md-medical-footer__column--contact { display: contents; }
  .md-site .md-medical-footer__column > section + section { margin-top: 0; }
  .md-site .md-medical-footer__column h3 {
    margin: 0; color: #333; font-family: var(--md-font-bold);
    font-size: 12px; font-weight: 400; line-height: 18px; white-space: normal;
  }
  .md-site .md-mobile-footer-group { border-bottom: .5px solid #cecece; }
  .md-site .md-mobile-footer-toggle {
    display: flex; width: 100%; min-height: 49.5px; margin: 0;
    padding: 12px 20px 12px 0; border: 0; border-radius: 0;
    color: inherit; background: url('/wp-content/themes/meituan-drone-child/assets/images/mobile/arrow-right-light.svg') right center / 7px 13px no-repeat;
    box-shadow: none; font: inherit; text-align: left; align-items: center; cursor: pointer;
  }
  .md-site .md-mobile-footer-toggle[aria-expanded="true"] { background-image: url('/wp-content/themes/meituan-drone-child/assets/images/mobile/arrow-down-light.svg'); background-size: 13px 7px; }
  .md-site .md-mobile-footer-panel { padding: 0 0 8px; }
  .md-site .md-mobile-footer-panel[hidden] { display: none; }
  .md-site .md-medical-footer__column a {
    display: flex; width: fit-content; max-width: 100%; min-width: 44px; min-height: 44px;
    margin: 0; padding: 12px 0; box-sizing: border-box;
    color: #666; font-size: 12px; line-height: 20px;
    white-space: normal; overflow-wrap: anywhere; align-items: center;
  }
  .md-site .md-medical-footer__column .md-medical-footer__follow { padding-top: 16px; }
  .md-site .md-medical-footer__follow h3 { margin-bottom: 16px; }
  .md-site .md-medical-footer__social { display: flex; gap: 4px; }
  .md-site .md-medical-footer__social-item {
    display: flex; width: 44px; height: 44px; min-width: 44px; min-height: 44px;
    margin: 0; padding: 0; align-items: center; justify-content: flex-start;
  }
  .md-site .md-medical-footer__social-icon { width: 28px; height: 28px; }
  .md-site :is([aria-controls="md-footer-wechat-qr"], [data-md-footer-wechat-trigger]) > .md-medical-footer__social-icon { content: url('/wp-content/themes/meituan-drone-child/assets/images/mobile/wechat.svg'); }
  .md-site [aria-controls="md-footer-redbook-qr"] > .md-medical-footer__social-icon { content: url('/wp-content/themes/meituan-drone-child/assets/images/mobile/redbook.svg'); }
  .md-site .md-medical-footer .md-medical-footer__qr {
    z-index: 20; top: auto; right: auto; bottom: 46px; left: 0;
    /* PC QR visibility rules load later; do not inherit their -50% centering. */
    transform: none !important;
  }
  .md-site .md-medical-footer__social-item:is(:hover, :focus-within, .is-open) .md-medical-footer__qr { transform: none; }
  .md-site .md-medical-footer__social-item.is-qr-dismissed .md-medical-footer__qr { visibility: hidden; opacity: 0; pointer-events: none; }
  .md-site .md-medical-footer__social-item.is-open .md-medical-footer__qr { visibility: visible; opacity: 1; pointer-events: auto; }
  .md-site [data-md-footer-wechat-trigger]:is(:hover, :focus-within, .is-open) .md-medical-footer__qr {
    visibility: hidden; opacity: 0; pointer-events: none;
  }
  .md-site .md-medical-footer__utility {
    position: static; display: flex; width: 100%; min-height: 44px;
    margin: 40px 0 0; padding: 0;
    flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px;
  }
  .md-site .md-medical-footer__brand {
    display: flex; width: 100.5px; height: 44px; min-width: 100.5px; margin: 0; align-items: center;
  }
  .md-site .md-medical-footer__brand img { width: 100.5px; height: 18px; content: url('/wp-content/themes/meituan-drone-child/assets/images/mobile/footer-logo.svg'); }
  .md-site .md-medical-footer__utility-links {
    display: flex; width: 176px; max-width: 100%; margin: 0; padding: 0;
    flex-wrap: nowrap; justify-content: space-between; gap: 0;
  }
  .md-site .md-medical-footer__utility-links a {
    display: flex; min-width: 0; min-height: 44px; margin: 0; padding: 0;
    color: #666; font-size: 12px; line-height: 20px; white-space: nowrap; align-items: center;
  }
  .md-site .md-medical-footer__legal {
    position: static; display: flex; width: 100%; min-height: 0; margin: 0; padding: 0;
    border-top: .5px solid #cecece; color: #adadad; font-size: 9px; line-height: 14px;
    flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0 16px;
  }
  .md-site .md-medical-footer__legal > span { display: inline-flex; min-width: 0; align-items: center; gap: 5px; }
  .md-site .md-medical-footer__legal a {
    display: inline-flex; min-width: 44px; min-height: 44px; color: inherit;
    font-size: inherit; line-height: inherit; white-space: normal; align-items: center;
  }
  .md-site .md-medical-footer__legal .md-footer-privacy-placeholder {
    display: inline-flex; min-width: 0; min-height: 44px; margin-left: auto;
    color: inherit; white-space: nowrap; align-items: center;
  }
  .md-site .md-medical-footer__legal img { width: 9.5px; height: 10px; content: url('/wp-content/themes/meituan-drone-child/assets/images/mobile/beian.png'); }
  .md-site .md-medical-footer :is(a, button):focus-visible { outline: 2px solid #b38d00; outline-offset: 2px; }
}
