/* ============================================================
   CAF AIIMS - Scientific & Bio Symbol Picker Styles
   ============================================================ */

.btn-symbol-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #002147, #0a3a70);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 2px 5px rgba(0, 33, 71, 0.15);
}

.btn-symbol-picker:hover {
  background: linear-gradient(135deg, #0a3a70, #1e40af);
  color: #fff;
  border-color: #fbbf24;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 33, 71, 0.25);
}

.btn-symbol-picker .sym-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(251, 191, 36, 0.2);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #fbbf24;
}

/* Symbol Popup Palette Modal / Dropdown */
.symbol-palette-popup {
  position: absolute;
  z-index: 999999;
  width: 360px;
  max-width: 95vw;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25), 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  animation: symFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes symFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sym-popup-header {
  background: linear-gradient(135deg, #002147, #1e3a8a);
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sym-popup-title {
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
}

.sym-popup-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background 0.15s ease;
}

.sym-popup-close:hover {
  background: rgba(239, 68, 68, 0.8);
}

.sym-popup-search-box {
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.sym-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s ease;
  background: #fff;
}

.sym-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.sym-tabs-bar {
  display: flex;
  background: #f1f5f9;
  padding: 4px 6px;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
}

.sym-tab-btn {
  background: transparent;
  border: none;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sym-tab-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #0f172a;
}

.sym-tab-btn.active {
  background: #ffffff;
  color: #002147;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sym-grid-container {
  padding: 10px;
  max-height: 220px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  background: #ffffff;
}

.sym-btn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  height: 42px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  padding: 2px;
}

.sym-btn-item:hover {
  background: #002147;
  border-color: #002147;
  color: #fbbf24;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 33, 71, 0.2);
}

.sym-btn-item .sym-char {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.1;
  color: #0f172a;
}

.sym-btn-item:hover .sym-char {
  color: #fbbf24;
}

.sym-btn-item .sym-sub {
  font-size: 8.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sym-btn-item:hover .sym-sub {
  color: rgba(255, 255, 255, 0.8);
}

.sym-popup-footer {
  padding: 6px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 10.5px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
