/* ============================================
   ListGene - White Theme with Blue Accents
   ============================================ */

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Smooth scroll + Base font size 1.1x */
html { scroll-behavior: smooth; font-size: 110%; }
@media (max-width: 640px) { html { font-size: 100%; } }

/* --- Filter Inputs --- */
.filter-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.filter-input {
  width: 100%;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: #111827;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.filter-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: #fff;
}
.filter-input::placeholder { color: #9ca3af; }

.filter-select {
  width: 100%;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.15s;
}
.filter-select:hover { border-color: #93c5fd; }
.filter-select .selected { color: #111827; }

/* --- Filter Dropdown --- */
.filter-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin-top: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  overflow: hidden;
}
.filter-dropdown-search {
  width: 100%;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 6px 10px;
  font-size: 0.75rem;
  color: #111;
  outline: none;
}
.filter-dropdown-search:focus { border-color: #3b82f6; }

.dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.1s;
}
.dropdown-item:hover { background: #eff6ff; }
.dropdown-group-label {
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #3b82f6;
  background: #f0f9ff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid #e5e7eb;
}
.dropdown-group-label:first-child { border-top: none; }

/* --- Checkboxes --- */
.check-input {
  accent-color: #3b82f6;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  cursor: pointer;
}
.check-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.check-label:hover { background: #eff6ff; color: #2563eb; }
.check-label:has(input:checked) {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

/* --- Active Filter Tags --- */
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 500;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-tag:hover { background: #dbeafe; }
.filter-tag svg { width: 12px; height: 12px; }

/* --- Quick Search Tags --- */
.quick-tag {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #f0f9ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  cursor: pointer;
  transition: all 0.15s;
}
.quick-tag:hover { background: #2563eb; color: #fff; border-color: #2563eb; }

/* --- Table Row --- */
.company-row {
  transition: background-color 0.1s;
  cursor: pointer;
}
.company-row:hover { background-color: #f0f9ff; }
.company-row:active { background-color: #dbeafe; }

/* --- Badge --- */
.badge-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #dcfce7;
}
.badge-yes i, .badge-yes svg { width: 10px; height: 10px; color: #16a34a; }
.badge-no {
  display: inline-block;
  width: 18px; height: 18px;
  text-align: center;
  line-height: 18px;
  color: #d1d5db;
  font-size: 10px;
}

/* --- Data Card (included data section) --- */
.data-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 14px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  text-align: center;
  transition: all 0.2s;
}
.data-card:hover { border-color: #bfdbfe; background: #eff6ff; transform: translateY(-2px); }
.data-card span { font-size: 1rem; font-weight: 700; color: #374151; }
.data-card small { font-size: 0.875rem; color: #9ca3af; }

/* --- FAQ --- */
.faq-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.faq-item[open] { box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-color: #bfdbfe; }
.faq-q {
  padding: 16px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; font-size: 1.25rem; color: #93c5fd; font-weight: 300; transition: transform 0.2s; }
[open] .faq-q::after { content: '-'; color: #3b82f6; }
.faq-a {
  padding: 0 20px 16px;
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.7;
}

/* --- Modal --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Download Bar --- */
.download-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 10px 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.download-bar.visible { transform: translateY(0); }

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 80px;
  right: 24px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.3s;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.toast-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.toast-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* --- Skeleton --- */
@keyframes shimmer {
  0% { background-position: -300% 0; }
  100% { background-position: 300% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 300% 100%;
  animation: shimmer 1.8s infinite;
  border-radius: 6px;
}

/* --- Detail Modal Content --- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-item dt {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}
.detail-item dd {
  font-size: 0.9375rem;
  color: #1f2937;
  word-break: break-all;
}

/* --- Mobile Responsive Enhancements --- */
@media (max-width: 640px) {
  /* AI search area */
  .ai-tab { padding: 8px 12px; font-size: 0.8125rem; }

  /* Filter panel on mobile: full width tabs scrollable */
  .ftab { padding: 12px 16px; font-size: 0.875rem; min-width: max-content; }

  /* Download bar compact */
  .download-bar { padding: 8px 12px; }

  /* Modal full-width on mobile */
  .modal-backdrop > div { margin: 8px; max-height: 90vh; border-radius: 1rem; }

  /* Table compact on mobile */
  .company-row td { padding: 8px 6px; }
}

/* --- Chip / Tag Selectors (replace dropdowns) --- */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #4b5563;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
  white-space: nowrap;
}
.chip:hover { border-color: #93c5fd; color: #2563eb; background: #f0f9ff; }
.chip.selected {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  box-shadow: 0 1px 4px rgba(37,99,235,0.25);
}
.chip-area {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}
.chip-area:hover { background: #dbeafe; }
.chip-area.selected { background: #2563eb; color: #fff; border-color: #2563eb; }

/* --- AI Tab --- */
.ai-tab { cursor: pointer; }
.ai-tab.active { background: rgba(255,255,255,0.2); color: #fff; }

/* --- Filter Tab Navigation --- */
.ftab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  border: none;
  background: transparent;
  white-space: nowrap;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
}
.ftab i, .ftab svg { width: 20px; height: 20px; }
@media (min-width: 1024px) {
  .ftab {
    border-bottom: none;
    border-left: 3px solid transparent;
    width: 100%;
    justify-content: flex-start;
    padding: 20px 28px;
  }
}
.ftab:hover { color: #2563eb; background: #eff6ff; }
.ftab.active {
  color: #2563eb;
  background: #eff6ff;
  border-bottom-color: #2563eb;
}
@media (min-width: 1024px) {
  .ftab.active { border-bottom-color: transparent; border-left-color: #2563eb; }
}
.ftab-content { display: block; }
.ftab-content.hidden { display: none; }

/* --- Data Check Cards --- */
.data-check-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
}
.data-check-card:hover { border-color: #93c5fd; background: #f0f9ff; }
.data-check-card:has(input:checked) { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 0 0 1px #3b82f6; }
.data-check-card strong { display: block; font-size: 0.9375rem; color: #374151; }
.data-check-card small { display: block; font-size: 0.75rem; color: #9ca3af; margin-top: 2px; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-row {
  animation: fadeInUp 0.2s ease-out both;
}
