/* ── H5 SPA Extra Styles ── */

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* View switching */
.view { display: none; }
.view.active { display: block; }

/* Sidebar */
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.05); border-radius: 10px; }

/* Chat scrollbar */
.custom-scrollbar::-webkit-scrollbar { height: 4px; width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #e1e3e4; border-radius: 10px; }

/* No scrollbar for date tabs */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Glass panel */
.glass-panel { background: rgba(255,255,255,0.8); backdrop-filter: blur(20px); }

/* Modal backdrop */
.modal-backdrop { background-color: rgba(25,28,29,0.4); backdrop-filter: blur(4px); }

/* Scientific card hover */
.scientific-card { background-color: #ffffff; transition: all 0.2s ease-out; }
.scientific-card:hover { background-color: #f3f4f5; }

/* Thinking animation */
@keyframes thinking-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}
.thinking-dots span {
  display: inline-block;
  width: 8px; height: 8px;
  margin: 0 2px;
  background: #0058bd;
  border-radius: 50%;
  animation: thinking-dot 1.4s infinite ease-in-out both;
}
.thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Sidebar & overlay transitions (inline styles handle initial state) */
#sidebar { transition: transform 0.3s ease; }
#sidebar-overlay { transition: opacity 0.3s ease; }

/* Home quick search chips */
.home-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  background: #f3f4f5;
  border-radius: 12px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #191c1d;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.home-chip:hover { background: #e7e8e9; }
.home-chip:active { transform: scale(0.98); }
.home-chip-icon { font-size: 16px; color: #727785; flex-shrink: 0; }

/* Home input bar — fixed to screen bottom */
#home-input-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  padding: 12px 16px;
  padding-bottom: env(safe-area-inset-bottom, 12px);
  z-index: 30;
}

/* Home main content — prevent overlap with fixed bar */
#home-main { padding-bottom: 100px; }

/* Chat bottom bar — fixed to screen bottom */
#chat-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  padding: 8px 0;
  padding-bottom: env(safe-area-inset-bottom, 8px);
  z-index: 30;
}

/* Chat message area — prevent content hidden behind fixed bar */
#chat-messages { padding-bottom: 100px; }

/* Chat message animations */
.msg-enter { animation: msgSlideIn 0.3s ease-out; }
@keyframes msgSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Duration selector active state */
.dur-btn.active {
  background: #0058bd;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0,88,189,0.3);
}

/* Checkin card states */
.checkin-done { border-left-color: #006e2c; }
.checkin-skip { border-left-color: #c2c6d5; opacity: 0.7; }

/* Evidence grade badges */
.grade-A { background: #86f898; color: #002108; }
.grade-B { background: #d8e2ff; color: #001a41; }
.grade-C { background: #ffdea0; color: #261a00; }
.grade-D { background: #e1e3e4; color: #424753; }

/* Body base */
body { min-height: 100dvh; }
