/* ============================================================================
   BlackFin Advisor Directory — custom styles
   (Tailwind utility classes handle most styling in index.html / app.js.
    This file holds the few things that are cleaner as real CSS.)
   ========================================================================= */

:root {
  --navy: #0A1628;
  --accent: #1E6FD9;
}

html {
  scroll-behavior: smooth;
}

/* ---- Navbar links ------------------------------------------------------- */
.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

.mobile-nav-link {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.mobile-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* ---- Form fields -------------------------------------------------------- */
.form-input {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgba(13, 13, 13, 0.15);
  background: #fff;
  padding: 0.625rem 0.75rem;
  font-size: 0.9rem;
  color: var(--navy);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input::placeholder {
  color: rgba(13, 13, 13, 0.4);
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.18);
}
.form-input[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ---- Filter checkboxes -------------------------------------------------- */
.filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.filter-row:hover {
  background-color: rgba(30, 111, 217, 0.06);
}
.filter-row input[type="checkbox"] {
  height: 1rem;
  width: 1rem;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.filter-row span {
  font-size: 0.875rem;
  line-height: 1.2;
  color: rgba(13, 13, 13, 0.8);
}
.filter-row input:checked + span {
  color: var(--navy);
  font-weight: 600;
}

/* ---- Tag chips ---------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
}
.tag-industry {
  background-color: var(--navy);
  color: #fff;
}
.tag-topic {
  background-color: rgba(30, 111, 217, 0.1);
  color: var(--accent);
}

/* ---- Modal open/close animation ----------------------------------------- */
.modal-root.is-open .modal-overlay {
  animation: fadeIn 0.2s ease forwards;
}
.modal-root.is-open .modal-panel {
  animation: panelIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.modal-root.is-closing .modal-overlay {
  animation: fadeOut 0.18s ease forwards;
}
.modal-root.is-closing .modal-panel {
  animation: panelOut 0.18s ease forwards;
}

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes panelOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(10px) scale(0.99); }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .modal-root.is-open .modal-overlay,
  .modal-root.is-open .modal-panel,
  .modal-root.is-closing .modal-overlay,
  .modal-root.is-closing .modal-panel {
    animation: none;
  }
}

/* Prevent body scroll while a modal is open. */
body.modal-open {
  overflow: hidden;
}
