/* 美益选油助手 · 轻量登录弹窗 + AI 顾问 样式 */
/* 配色：深蓝主色 #16213e / 金 #c8a45c / 成功绿 */

#oilauth-chip {
  position: fixed;
  /* 导航栏 sticky top:0，高约 70~84px；移到栏下方避免压住右上角「开始选油」红按钮 */
  top: 78px;
  right: 14px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #16213e, #0c2c50);
  color: #fff;
  font-size: 12.5px;
  line-height: 1;
  border: 1px solid rgba(200,164,92,0.55);
  box-shadow: 0 6px 18px -6px rgba(0,0,0,0.55);
  cursor: pointer;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
#oilauth-chip:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(0,0,0,0.7); }
#oilauth-chip .oa-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(200,164,92,0.25); display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: #c8a45c;
}
#oilauth-chip .oa-score { color: #ffd98a; font-weight: 600; }
#oilauth-chip .oa-menu {
  position: absolute; top: 44px; right: 0; min-width: 150px;
  background: #fff; color: #222; border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 40px -10px rgba(0,0,0,0.45); display: none; flex-direction: column;
}
#oilauth-chip .oa-menu.open { display: flex; }
#oilauth-chip .oa-menu button {
  background: none; border: none; text-align: left; padding: 9px 12px; border-radius: 8px;
  font-size: 13px; color: #222; cursor: pointer;
}
#oilauth-chip .oa-menu button:hover { background: #f2f4f8; }

/* 遮罩 + 弹窗 */
#oilauth-overlay {
  position: fixed; inset: 0; z-index: 9991;
  background: rgba(8,12,24,0.62); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
#oilauth-overlay.open { display: flex; }
.oa-card {
  width: 100%; max-width: 380px; background: #fff; color: #1c2433;
  border-radius: 18px; padding: 22px 22px 24px; position: relative;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.65);
  max-height: 90vh; overflow-y: auto;
}
.oa-close {
  position: absolute; top: 12px; right: 14px; border: none; background: none;
  font-size: 20px; color: #9aa; cursor: pointer; line-height: 1;
}
.oa-title { font-size: 19px; font-weight: 700; margin-bottom: 2px; color: #16213e; }
.oa-sub { font-size: 12.5px; color: #8a93a6; margin-bottom: 16px; }
.oa-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.oa-tab {
  flex: 1 1 auto; padding: 8px 6px; border-radius: 10px; border: 1px solid #e3e7ef;
  background: #f6f8fb; cursor: pointer; font-size: 13px; text-align: center;
  color: #55607a;
}
.oa-tab.active { background: #16213e; color: #fff; border-color: #16213e; }
.oa-tab.disabled { opacity: .5; cursor: not-allowed; }
.oa-field { margin-bottom: 12px; }
.oa-field label { display: block; font-size: 12.5px; color: #6b7488; margin-bottom: 5px; }
.oa-field input {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid #d8deea;
  font-size: 14px; outline: none; box-sizing: border-box; background: #fbfcfe;
}
.oa-field input:focus { border-color: #16213e; box-shadow: 0 0 0 3px rgba(22,33,62,0.10); }
.oa-btn {
  width: 100%; padding: 12px; border: none; border-radius: 11px; cursor: pointer;
  background: linear-gradient(135deg, #16213e, #0c2c50); color: #fff; font-size: 15px; font-weight: 600;
  margin-top: 4px;
}
.oa-btn:active { transform: translateY(1px); }
.oa-btn[disabled] { opacity: .55; cursor: not-allowed; }
.oa-hint { font-size: 12px; color: #c0392b; min-height: 16px; margin: 8px 0 0; }
.oa-note { font-size: 11.5px; color: #97a0b3; margin-top: 12px; text-align: center; }
.oa-switch { font-size: 12.5px; color: #55607a; text-align: center; margin-top: 10px; }
.oa-switch a { color: #c8a45c; cursor: pointer; text-decoration: none; font-weight: 600; }

/* AI 顾问弹窗 */
.oa-ai-ctx { font-size: 12px; color: #6b7488; background: #f3f6fb; border-radius: 10px; padding: 9px 11px; margin-bottom: 12px; }
.oa-ai-textarea {
  width: 100%; min-height: 84px; padding: 11px 12px; border-radius: 10px; border: 1px solid #d8deea;
  font-size: 14px; outline: none; resize: vertical; box-sizing: border-box; font-family: inherit;
}
.oa-ai-answer {
  margin-top: 14px; padding: 14px; border-radius: 12px; background: #f7f9fc; border: 1px solid #e6ebf3;
  font-size: 13.5px; line-height: 1.7; color: #2a3447; white-space: pre-wrap; display: none;
}
.oa-ai-answer.show { display: block; }
.oa-ai-meta { font-size: 12px; color: #8a93a6; margin-top: 10px; }
.oa-toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%);
  background: rgba(20,20,40,0.92); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; z-index: 9999; opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.oa-toast.show { opacity: 1; }

/* AI 顾问悬浮球（登录区旁常驻入口，选油全程可点） */
#oa-ai-ball {
  position: fixed;
  right: 14px;
  z-index: 9989;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c8a45c, #b8914a);
  color: #1c1305;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 6px 18px -6px rgba(0,0,0,0.55);
  cursor: pointer;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
#oa-ai-ball:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(0,0,0,0.7); }
#oa-ai-ball .oa-ai-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(28,19,5,0.18); display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
}
