/* ============================================
   LOVEWORLD MEDICAID — Additional Utilities
   ============================================ */

/* Page transitions */
body {
  animation: pageIn 0.5s ease forwards;
}
@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Image fallbacks */
img {
  object-fit: cover;
  background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
}
img[src=""], img:not([src]) {
  display: none;
}

/* Form focus rings */
.form-control:focus {
  box-shadow: 0 0 0 3px rgba(10, 77, 110, 0.12);
}

/* Smooth hover all links */
a { transition: color 0.3s ease; }

/* Selection color */
::selection {
  background: rgba(10, 77, 110, 0.15);
  color: var(--dark);
}

/* Donate amounts on CTA page */
.donate-amt:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Alert / success messages */
.alert-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 12px;
  padding: 14px 20px;
  color: #155724;
  font-size: 0.9rem;
}
.alert-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 12px;
  padding: 14px 20px;
  color: #721c24;
  font-size: 0.9rem;
}

/* Sticky nav adjustments */
.nav-wrapper:not(.scrolled) .nav-logo-name,
.nav-wrapper:not(.scrolled) .nav-links a {
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Table responsive */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left; font-size: 0.9rem;
}
th { font-weight: 700; color: var(--dark); background: var(--cream); }

/* Video embed */
.video-wrap {
  position: relative; padding-bottom: 56.25%;
  height: 0; overflow: hidden; border-radius: 16px;
}
.video-wrap iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: none;
}

/* Print styles */
@media print {
  .nav-wrapper, footer, .scroll-top-btn,
  .modal-overlay, .subscribe-section { display: none !important; }
  body { font-size: 12pt; }
  a { color: inherit; text-decoration: none; }
}

/* Accessibility: focus visible */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Tooltip */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: var(--dark); color: white;
  padding: 6px 12px; border-radius: 8px;
  font-size: 0.75rem; white-space: nowrap;
  pointer-events: none; opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 100;
}
[data-tooltip]:hover::after { opacity: 1; }

/* Pull quote */
.pull-quote {
  border-left: 4px solid var(--accent);
  padding: 20px 28px;
  background: var(--cream);
  border-radius: 0 16px 16px 0;
  margin: 32px 0;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--dark);
  line-height: 1.7;
}

/* Badge chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(10, 77, 110, 0.08);
  color: var(--primary);
  padding: 4px 14px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 600;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.5px;
}
.chip.accent {
  background: rgba(232, 160, 32, 0.12);
  color: #9a6a00;
}
