/**
 * bird-doctor.css - AI小鸟医生页面样式
 * 匹配现有 iOS/微信粉色风格
 */

/* ===== 页面背景 ===== */
#page-vet {
  overflow-x: hidden !important;
}
#page-vet .vet-bg {
  width: 100%;
  min-height: 100%;
  background: linear-gradient(180deg, #e8f4fd 0%, var(--primary-bg) 100%);
  padding-bottom: 20px;
  box-sizing: border-box;
}

/* ===== Banner ===== */
.vet-banner {
  position: relative;
  overflow: hidden;
  padding: 28px 20px 24px;
  color: #fff;
}
.vet-banner-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 40%, #f093fb 100%);
  z-index: 0;
}
.vet-banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.15) 0%, transparent 60%),
              radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 40%);
}
.vet-banner-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.vet-banner-icon {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 8px;
  animation: vetBounce 2s ease-in-out infinite;
}
@keyframes vetBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.vet-banner-title {
  font-size: 22px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin-bottom: 4px;
}
.vet-banner-subtitle {
  font-size: 12px;
  opacity: 0.85;
  letter-spacing: 0.5px;
}

/* ===== Tab 切换 ===== */
.vet-tabs {
  display: flex;
  margin: -12px 16px 16px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 16px;
  padding: 5px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  position: relative;
  z-index: 5;
}
.vet-tab {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}
.vet-tab.active {
  background: linear-gradient(135deg, var(--accent) 0%, #ff7597 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,77,109,0.3);
  transform: scale(1.02);
}

/* ===== Tab 内容 ===== */
.vet-tab-content {
  display: none;
  padding: 0 16px;
  animation: vetFadeIn 0.3s ease;
}
.vet-tab-content.active {
  display: block;
}
@keyframes vetFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 聊天界面 ===== */
.vet-chat-box {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 16px 12px;
  min-height: 320px;
  max-height: 45vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.vet-msg {
  display: flex;
  gap: 8px;
  max-width: 100%;
  animation: vetMsgIn 0.3s ease;
}
@keyframes vetMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.vet-msg-user {
  justify-content: flex-end;
}
.vet-msg-doctor {
  justify-content: flex-start;
}

.vet-msg-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}

.vet-msg-content {
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 44px);
}

.vet-msg-bubble {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  word-break: break-word;
}
.vet-msg-bubble-user {
  background: linear-gradient(135deg, var(--accent) 0%, #ff7597 100%);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 2px 8px rgba(255,77,109,0.2);
}
.vet-msg-bubble-doctor {
  background: #fff;
  color: var(--text-main);
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}

/* ===== 聊天输入 ===== */
.vet-chat-input {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.vet-chat-input input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s;
  -webkit-appearance: none;
}
.vet-chat-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,77,109,0.12);
}
.vet-chat-input button {
  padding: 0 20px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff7597 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255,77,109,0.25);
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.vet-chat-input button:active {
  transform: scale(0.94);
}

/* ===== 快捷问题 ===== */
.vet-quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.vet-quick-questions span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
  color: #576b95;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  -webkit-tap-highlight-color: transparent;
}
.vet-quick-questions span:active {
  transform: scale(0.95);
  background: rgba(102,126,234,0.08);
}

/* ===== 疾病卡片 ===== */
.vet-disease-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin: 8px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.03);
}
.vet-disease-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
}
.vet-disease-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.vet-disease-sev {
  font-size: 12px;
  font-weight: 600;
}
.vet-disease-section {
  margin-bottom: 12px;
}
.vet-disease-section:last-child {
  margin-bottom: 0;
}
.vet-disease-label {
  font-size: 13px;
  font-weight: 700;
  color: #576b95;
  margin-bottom: 4px;
}
.vet-disease-text {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.65;
  font-weight: 500;
}
.vet-disease-urgent {
  background: rgba(255,77,109,0.05);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
}
.vet-disease-urgent .vet-disease-label {
  color: var(--accent);
}

/* ===== 症状自查 ===== */
.vet-sc-intro {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.6);
  border-radius: 14px;
}
.vet-sc-category {
  margin-bottom: 16px;
}
.vet-sc-cat-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  padding-left: 4px;
}
.vet-sc-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vet-sc-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  border: 1.5px solid transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  -webkit-tap-highlight-color: transparent;
}
.vet-sc-option:active {
  transform: scale(0.95);
}
.vet-sc-option.vet-sc-selected {
  background: linear-gradient(135deg, rgba(102,126,234,0.12), rgba(240,147,251,0.08));
  border-color: #667eea;
  color: #667eea;
}
.vet-sc-check {
  font-size: 16px;
  line-height: 1;
}

.vet-sc-result-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin: 20px 0 8px;
  text-align: center;
}
.vet-sc-result-info {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 16px;
  font-weight: 600;
}
.vet-sc-no-result {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  background: rgba(255,255,255,0.6);
  border-radius: 16px;
  margin-top: 16px;
}
.vet-sc-warn {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255,77,109,0.06);
  border-radius: 12px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  text-align: center;
  line-height: 1.6;
}

/* ===== 养鸟指南 ===== */
.vet-guide-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 12px;
  scrollbar-width: none;
}
.vet-guide-tabs::-webkit-scrollbar {
  display: none;
}
.vet-guide-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  padding: 10px 4px;
  border-radius: 14px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.25s;
  border: 2px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.vet-guide-tab:active {
  transform: scale(0.95);
}
.vet-guide-tab.active {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(255,77,109,0.15);
  transform: scale(1.02);
}

.vet-guide-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.03);
  animation: vetFadeIn 0.3s ease;
}
.vet-guide-card-inline {
  max-height: none;
  overflow: visible;
}
.vet-guide-card-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.vet-guide-section {
  margin-bottom: 16px;
}
.vet-guide-section:last-child {
  margin-bottom: 0;
}
.vet-guide-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}
.vet-guide-section-text {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
  font-weight: 500;
}

/* ===== 深色模式适配 ===== */
body.dark-mode #page-vet .vet-bg {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
}
body.dark-mode .vet-tabs {
  background: rgba(44,44,46,0.9);
}
body.dark-mode .vet-chat-box {
  background: rgba(44,44,46,0.5);
}
body.dark-mode .vet-msg-bubble-doctor {
  background: #2c2c2e;
  color: #e8e8e8;
  border-color: rgba(255,255,255,0.08);
}
body.dark-mode .vet-chat-input input {
  background: #2c2c2e;
  border-color: rgba(255,255,255,0.1);
  color: #e8e8e8;
}
body.dark-mode .vet-quick-questions span {
  background: rgba(44,44,46,0.8);
  color: #8ea0d4;
  border-color: rgba(255,255,255,0.06);
}
body.dark-mode .vet-disease-card {
  background: #2c2c2e;
  border-color: rgba(255,255,255,0.06);
}
body.dark-mode .vet-disease-name {
  color: #e8e8e8;
}
body.dark-mode .vet-disease-text {
  color: #ccc;
}
body.dark-mode .vet-disease-urgent {
  background: rgba(255,77,109,0.1);
}
body.dark-mode .vet-sc-intro {
  background: rgba(44,44,46,0.5);
  color: #aaa;
}
body.dark-mode .vet-sc-option {
  background: rgba(44,44,46,0.7);
  color: #ccc;
}
body.dark-mode .vet-sc-option.vet-sc-selected {
  background: rgba(102,126,234,0.2);
  color: #8ea0d4;
}
body.dark-mode .vet-sc-no-result,
body.dark-mode .vet-sc-warn {
  background: rgba(255,77,109,0.1);
}
body.dark-mode .vet-guide-tab {
  background: rgba(44,44,46,0.7);
}
body.dark-mode .vet-guide-tab.active {
  background: #2c2c2e;
}
body.dark-mode .vet-guide-card {
  background: #2c2c2e;
  border-color: rgba(255,255,255,0.06);
}
body.dark-mode .vet-guide-section-title {
  color: #e8e8e8;
}
body.dark-mode .vet-guide-section-text {
  color: #aaa;
}

/* ===== 小屏适配 ===== */
@media (max-width: 360px) {
  .vet-tab {
    font-size: 12px;
    padding: 9px 2px;
  }
  .vet-quick-questions span {
    font-size: 11px;
    padding: 6px 10px;
  }
  .vet-guide-tab {
    width: 64px;
  }
}

/* ===== 横屏适配 ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .vet-chat-box {
    min-height: 200px;
    max-height: 35vh;
  }
}

/* ===== 7项底部导航适配 ===== */
.bottom-nav {
  gap: 2px !important;
}
.bottom-nav .nav-item {
  min-width: 48px;
  max-width: 58px;
}
@media (max-width: 380px) {
  .bottom-nav .nav-item {
    min-width: 42px;
    max-width: 52px;
    padding: 5px 3px;
    font-size: 9px;
  }
  .bottom-nav .nav-icon {
    font-size: 20px;
  }
}
@media (max-width: 320px) {
  .bottom-nav .nav-item {
    min-width: 38px;
    max-width: 46px;
    padding: 5px 2px;
    font-size: 8px;
  }
  .bottom-nav .nav-icon {
    font-size: 18px;
  }
}
