/* PC端医生端页面专用布局系统 */

/* 通用规则：确保医生端导航栏在PC端始终可见（不依赖body类） */
@media (min-width: 1024px) {
  /* 医生端页面（路径包含/doctor/）的导航栏通用显示规则 */
  body:has(nav.health-nav) nav.health-nav,
  body:has(.health-nav) .health-nav {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

@media (min-width: 1024px) {
  /* ============================================
     PC端医生端导航栏 - 固定顶部，紧凑设计
     ============================================ */
  
  body.doctor-pc-page {
    padding-top: 0 !important; /* 统一顶部导航使用sticky定位，不需要padding-top */
    margin-top: 0 !important;
  }

  /* PC端导航栏确保正确显示 - 使用更高优先级的选择器 */
  body.doctor-pc-page nav.health-nav,
  body.doctor-pc-page .health-nav,
  /* 通用规则：医生端页面导航栏（即使没有doctor-pc-page类） */
  body:has(nav.health-nav) nav.health-nav,
  body:has(.health-nav) .health-nav {
    position: sticky !important;
    position: -webkit-sticky !important; /* Safari */
    top: 0 !important;
    z-index: var(--health-z-sticky, 1020) !important;
    width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    height: auto !important;
    min-height: 60px !important;
  }
  
  /* PC端导航栏内容区域 - 覆盖health-ui.css中的max-width限制 */
  body.doctor-pc-page nav.health-nav .health-nav-content,
  body.doctor-pc-page .health-nav .health-nav-content,
  body.doctor-pc-page .health-nav-content,
  /* 通用规则：医生端页面导航栏内容 */
  body:has(nav.health-nav) nav.health-nav .health-nav-content,
  body:has(.health-nav) .health-nav .health-nav-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 var(--health-spacing-md, 16px) !important;
    margin: 0 auto !important;
  }
  
  /* 超大屏幕也保持全宽，不限制宽度 */
  @media (min-width: 1400px) {
    body.doctor-pc-page nav.health-nav .health-nav-content,
    body.doctor-pc-page .health-nav .health-nav-content,
    body.doctor-pc-page .health-nav-content,
    body:has(nav.health-nav) nav.health-nav .health-nav-content,
    body:has(.health-nav) .health-nav .health-nav-content {
      max-width: 1400px !important;
      width: 100% !important;
      margin: 0 auto !important;
    }
  }

  /* 隐藏移动端底部导航 */
  body.doctor-pc-page #doctorBottomNav,
  body:has(#doctorBottomNav) #doctorBottomNav {
    display: none !important;
  }

  /* 隐藏移动端顶部导航栏（如果有） */
  body.doctor-pc-page #mobileNav,
  body:has(#mobileNav) #mobileNav {
    display: none !important;
  }

  /* 确保内容区域正确显示 */
  body.doctor-pc-page .health-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }

  /* 移除body的padding-top和margin-top（如果有） */
  body.doctor-pc-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  
  /* 确保内容区域正确显示 */
  body.doctor-pc-page > *:not(#doctorBottomNav):not(#mobileNav) {
    margin-top: 0;
  }
}

/* 移动端保持原有样式 */
@media (max-width: 1023px) {
  body.doctor-pc-page {
    padding-top: 0;
  }

  /* 确保移动端统一顶部导航显示 */
  body.doctor-pc-page .health-nav {
    display: block !important;
  }

  body.doctor-pc-page #doctorBottomNav {
    display: block !important;
  }
}
