/* ==========================================================
   Custom styles for Know My Rights AI
   ========================================================== */

/* ---------------- Accessibility improvements ---------------- */
.btn:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 151, 178, 0.4);
}

/* ---------------- Chat message styling ---------------- */
#chatMessages {
  background-color: var(--bs-gray-100);
  border-radius: 0.375rem;
  padding: 1rem;
}

/* ---------------- User message styling ---------------- */
.bg-primary {
  background-color: #BF669F !important;
}

/* ---------------- AI message styling ---------------- */
.card.border-success .card-body {
  background-color: rgba(81, 112, 255, 0.07);
}

/* ---------------- Info message styling ---------------- */
.card.border-info .card-body {
  background-color: rgba(255, 87, 142, 0.07);
}

/* ---------------- Disclaimer styling ---------------- */
.alert-warning {
  border-left: 4px solid var(--bs-warning);
}

/* ---------------- Loading animation ---------------- */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* ---------------- Language indicator ---------------- */
.language-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.75rem;
}

/* ---------------- Responsive adjustments ---------------- */
@media (max-width: 768px) {
  .display-4 {
    font-size: 2.5rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  #chatMessages {
    height: 300px !important;
  }
}

/* ---------------- High contrast mode support ---------------- */
@media (prefers-contrast: high) {
  .card {
    border-width: 2px;
  }

  .btn {
    border-width: 2px;
  }
}

/* ---------------- Reduced motion support ---------------- */
@media (prefers-reduced-motion: reduce) {
  .loading {
    animation: none;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------- Buttons ---------------- */
.btn-outline-primary {
  color: #BF669F;
  border-color: #BF669F;
  background-color: transparent;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: #BF669F;
  color: white;
  border-color: #BF669F;
}

/* ---------------- Print styles ---------------- */
@media print {
  .navbar,
  .modal,
  .btn,
  footer {
    display: none !important;
  }

  .card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }
}

/* ==========================================================
   Founder Page Styling — font consistency and layout polish
   ========================================================== */

.founder-section {
  background-color: #f8f9fa;
  font-family: inherit;
  color: #1B2333;
}

/* Match entire site typography */
.founder-section p,
.founder-section strong,
.founder-section em,
.founder-section b,
.founder-section i,
.founder-section h1,
.founder-section h2,
.founder-section h3,
.founder-section h4,
.founder-section h5,
.founder-section h6 {
  font-family: inherit !important;
  color: #1B2333 !important;
  line-height: 1.6;
}

/* Italics fix (keeps sans-serif but elegant) */
.founder-section em {
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Override Bootstrap .lead font mismatch */
.founder-section .lead {
  font-size: 1rem;
  font-weight: 400;
  color: #1B2333 !important;
}

/* Image styling (rounded + subtle shadow) */
.founder-section img {
  max-width: 280px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Navbar link alignment fix */
.navbar-nav .nav-link i {
  vertical-align: middle;
  margin-right: 0.25rem;
  opacity: 0.9;
}

.navbar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}