/* ibex-dev-docs/design/css/common.css */

/* 手机边框容器样式：在 PC 宽屏上显示为 iPhone 物理外框，小屏自适应全屏 */
@media (min-width: 768px) {
  .phone-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f1f5f9;
    min-height: 100vh;
    padding: 20px 0;
  }
  
  .phone-shell {
    width: 375px;
    height: 812px;
    background-color: #ffffff;
    border: 12px solid #1e293b;
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* 仿 iPhone 药丸屏灵动岛 */
  .phone-shell::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 25px;
    background-color: #1e293b;
    border-radius: 15px;
    z-index: 100;
  }

  /* 顶栏微信状态栏模拟 */
  .phone-header {
    height: 44px;
    background-color: #ffffff;
    color: #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    font-size: 12px;
    font-weight: 500;
    z-index: 50;
    flex-shrink: 0;
  }
  
  .phone-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .phone-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
  }

  /* 底部微信小黑条指示线 */
  .phone-footer-bar {
    height: 24px;
    background-color: #ffffff;
    position: relative;
    z-index: 50;
    flex-shrink: 0;
  }
  
  .phone-footer-bar::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background-color: #94a3b8;
    border-radius: 2px;
  }
}

@media (max-width: 767px) {
  .phone-container {
    background-color: #ffffff;
    min-height: 100vh;
  }
  
  .phone-shell {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .phone-header {
    display: none; /* 移动端预览不显示虚拟状态栏 */
  }
  
  .phone-footer-bar {
    display: none;
  }
  
  .phone-content {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
}

/* 微信小程序标题栏样式 */
.mini-title-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid #f1f5f9;
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 40;
}

/* 微信小程序底部Tab栏 */
.mini-tab-bar {
  height: 52px;
  border-top: 1px solid #e2e8f0;
  background-color: #ffffff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 10px;
  color: #64748b;
  flex-shrink: 0;
}

.mini-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  width: 25%;
}

.mini-tab-item.active {
  color: #10b981; /* 微信经典绿色 */
}

/* 隐藏滚动条 */
.phone-content::-webkit-scrollbar {
  display: none;
}
.phone-content {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* 扫码红外线激光扫描动画 */
@keyframes laser-scan {
  0% { top: 0%; opacity: 0.8; }
  50% { top: 100%; opacity: 1; }
  100% { top: 0%; opacity: 0.8; }
}

.scanner-laser {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #10b981, transparent);
  box-shadow: 0 0 10px 3px rgba(16, 185, 129, 0.6);
  animation: laser-scan 2.5s ease-in-out infinite;
}

/* Modal 与 Bottom Sheet 遮罩 */
.drawer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* Bottom Sheet 抽屉从底部拉起 */
.bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 110;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-height: 80%;
  display: flex;
  flex-direction: column;
}

.bottom-sheet.show {
  transform: translateY(0);
}

/* 居中 Modal 缩放淡入 */
.center-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background-color: #ffffff;
  border-radius: 16px;
  z-index: 120;
  width: 85%;
  max-width: 320px;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.center-modal.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* 微信支付键盘弹层 */
.pay-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #f7f7f7;
  z-index: 130;
  transform: translateY(100%);
  transition: transform 0.25s ease-out;
}

.pay-sheet.show {
  transform: translateY(0);
}

/* 按钮点击触水波反馈 */
.btn-ripple {
  position: relative;
  overflow: hidden;
}
.btn-ripple::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10);
  opacity: 0;
  transition: transform .3s, opacity .5s;
}
.btn-ripple:active::after {
  transform: scale(0);
  opacity: .3;
  transition: 0s;
}

/* PC后台左侧边栏及布局样式 */
.admin-layout {
  display: flex;
  height: 100vh;
  background-color: #f4f5f8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.admin-sidebar {
  width: 220px;
  background-color: #1f2229;
  color: #a9adb8;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-logo {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
  border-bottom: 1px solid #2e323d;
  gap: 8px;
}

.admin-menu {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.admin-menu-item {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.admin-menu-item:hover {
  background-color: #2e323d;
  color: #ffffff;
}

.admin-menu-item.active {
  background-color: #00b42a; /* Arco Green */
  color: #ffffff;
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-header {
  height: 60px;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e6eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  flex-shrink: 0;
}

.admin-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.admin-card {
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid #e5e6eb;
  padding: 24px;
}
