/*
 * Ogun Connect — Bootstrap 5 Custom Theme
 * Couleurs brand, utilitaires et overrides pour harmoniser toutes les vues publiques.
 */

/* ======================================================================
   CSS Custom Properties (Brand Palette)
   ====================================================================== */
:root {
  --og-brand-50:  #f0fdfa;
  --og-brand-100: #ccfbf1;
  --og-brand-200: #a7f3d0;
  --og-brand-300: #72eccb;
  --og-brand-400: #2dd4bf;
  --og-brand-500: #018382;
  --og-brand-600: #016b6a;
  --og-brand-700: #015554;
  --og-brand-800: #01423f;
  --og-brand-900: #012e2d;

  --og-accent-50:  #fff7ed;
  --og-accent-100: #ffedd5;
  --og-accent-200: #fed7aa;
  --og-accent-300: #fdba74;
  --og-accent-400: #fb923c;
  --og-accent-500: #fc8d15;
  --og-accent-600: #ea7c0d;
  --og-accent-700: #c2670a;

  /* Alias for backward compatibility */
  --ogun-accent: var(--og-accent-500);

  /* Bootstrap overrides */
  --bs-primary:   #018382;
  --bs-primary-rgb: 1, 131, 130;
  --bs-link-color: #018382;
  --bs-link-hover-color: #015554;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ======================================================================
   Global
   ====================================================================== */
html { scroll-behavior: smooth; }
[x-cloak] { display: none !important; }
body { font-family: var(--bs-body-font-family); }

/* ======================================================================
   Brand Border Utilities
   ====================================================================== */
.border-brand-600 { border-color: var(--og-brand-600) !important; }
.border-brand-500 { border-color: var(--og-brand-500) !important; }
.border-accent-500 { border-color: var(--og-accent-500) !important; }

/* ======================================================================
   Brand Background Utilities
   ====================================================================== */
.bg-brand-50  { background-color: var(--og-brand-50) !important; }
.bg-brand-100 { background-color: var(--og-brand-100) !important; }
.bg-brand-500 { background-color: var(--og-brand-500) !important; }
.bg-brand-600 { background-color: var(--og-brand-600) !important; }
.bg-brand-700 { background-color: var(--og-brand-700) !important; }

.bg-accent-50  { background-color: var(--og-accent-50) !important; }
.bg-accent-100 { background-color: var(--og-accent-100) !important; }
.bg-accent-500 { background-color: var(--og-accent-500) !important; }
.bg-accent-600 { background-color: var(--og-accent-600) !important; }

/* ======================================================================
   Brand Text Utilities
   ====================================================================== */
.text-brand-300 { color: var(--og-brand-300) !important; }
.text-brand-400 { color: var(--og-brand-400) !important; }
.text-brand-500 { color: var(--og-brand-500) !important; }
.text-brand-600 { color: var(--og-brand-600) !important; }
.text-brand-700 { color: var(--og-brand-700) !important; }

.text-accent-400 { color: var(--og-accent-400) !important; }
.text-accent-500 { color: var(--og-accent-500) !important; }
.text-accent-600 { color: var(--og-accent-600) !important; }

/* ======================================================================
   Brand Buttons
   ====================================================================== */
.btn-brand {
  background-color: var(--og-brand-500);
  border-color: var(--og-brand-500);
  color: #fff;
}
.btn-brand:hover, .btn-brand:focus {
  background-color: var(--og-brand-600);
  border-color: var(--og-brand-600);
  color: #fff;
}

.btn-accent {
  background-color: var(--og-accent-500);
  border-color: var(--og-accent-500);
  color: #fff;
}
.btn-accent:hover, .btn-accent:focus {
  background-color: var(--og-accent-600);
  border-color: var(--og-accent-600);
  color: #fff;
}

.btn-outline-brand {
  border-color: var(--og-brand-500);
  color: var(--og-brand-600);
}
.btn-outline-brand:hover, .btn-outline-brand:focus {
  background-color: var(--og-brand-500);
  color: #fff;
}

.btn-outline-accent {
  border-color: var(--og-accent-500);
  color: var(--og-accent-600);
}
.btn-outline-accent:hover, .btn-outline-accent:focus {
  background-color: var(--og-accent-500);
  color: #fff;
}

/* ======================================================================
   Brand Gradient
   ====================================================================== */
.bg-brand-gradient {
  background: linear-gradient(150deg, #015554 0%, #018382 50%, #0fa8a7 100%);
}
.bg-hero-gradient {
  background: linear-gradient(150deg, #015554 0%, #018382 45%, #0fa8a7 80%, #72eccb 100%);
}

/* ======================================================================
   WCAG — Touch Targets & Focus
   ====================================================================== */
.btn, .nav-link, .form-control, .form-select,
a.list-group-item, .dropdown-item {
  min-height: 44px;
}
.btn-sm {
  min-height: 36px;
}

/* Visible focus ring for keyboard navigation */
:focus-visible {
  outline: 3px solid rgba(1, 131, 130, 0.5);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--og-brand-500);
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ======================================================================
   Card Enhancements
   ====================================================================== */
.card-ogun {
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.card-ogun:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border-color: var(--og-brand-200);
}

/* ======================================================================
   Form Enhancements
   ====================================================================== */
.form-control:focus, .form-select:focus {
  border-color: var(--og-brand-400);
  box-shadow: 0 0 0 .25rem rgba(1, 131, 130, .15);
}

.form-control-ogun {
  border-radius: .75rem;
  padding: .75rem 1rem;
}

/* ======================================================================
   Badge / Status
   ====================================================================== */
.badge-status {
  font-size: .75rem;
  font-weight: 600;
  padding: .35em .75em;
  border-radius: 50rem;
}
.badge-confirmed  { background-color: #d1fae5; color: #065f46; }
.badge-pending    { background-color: #fef3c7; color: #92400e; }
.badge-scheduled  { background-color: #dbeafe; color: #1e40af; }
.badge-cancelled  { background-color: #fee2e2; color: #991b1b; }
.badge-completed  { background-color: #e0e7ff; color: #3730a3; }
.badge-missed     { background-color: #f3f4f6; color: #4b5563; }

/* ======================================================================
   Slot Buttons (booking)
   ====================================================================== */
.slot-btn {
  display: inline-block;
  border: 2px solid #bfdbfe;
  color: #1d4ed8;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: .5rem;
  font-size: .8125rem;
  transition: all .15s;
  cursor: pointer;
  background: transparent;
  min-height: 44px;
  line-height: 1.5;
}
.slot-btn:hover, .slot-btn:focus {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.slot-btn.selected {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* ======================================================================
   Avatar Circle
   ====================================================================== */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  border-radius: 50%;
}
.avatar-sm { width: 2rem; height: 2rem; font-size: .75rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: .875rem; }
.avatar-lg { width: 3rem; height: 3rem; font-size: 1rem; }
.avatar-xl { width: 3.5rem; height: 3.5rem; font-size: 1.125rem; }

/* ======================================================================
   OTP Input
   ====================================================================== */
.otp-box {
  width: 56px;
  height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  transition: all .15s;
  outline: none;
  color: var(--og-brand-500);
}
.otp-box:focus {
  border-color: var(--og-brand-500);
  box-shadow: 0 0 0 3px rgba(1,131,130,.15);
}
.otp-box.filled {
  border-color: var(--og-brand-500);
  background: var(--og-brand-50);
}

/* ======================================================================
   Search Glow
   ====================================================================== */
.search-glow:focus-within {
  box-shadow: 0 0 0 3px rgba(1,131,130,.2);
}

/* ======================================================================
   Responsive Utilities
   ====================================================================== */
.container-narrow { max-width: 640px; }
.container-medium { max-width: 960px; }
.container-xl     { max-width: 1200px; }

/* Wave SVG bottom */
.wave-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

/* ======================================================================
   Accent & Purple Gradients (Search Avatars)
   ====================================================================== */
.bg-accent-gradient {
  background: linear-gradient(150deg, #ea7c0d 0%, #fc8d15 50%, #fdba74 100%);
}
.bg-purple-gradient {
  background: linear-gradient(150deg, #6d28d9 0%, #8b5cf6 50%, #a78bfa 100%);
}

/* ======================================================================
   Search Results — Card hover & animations
   ====================================================================== */
.search-result-card,
.clinic-result-card {
  transition: box-shadow .2s, border-color .2s, transform .15s;
}
.search-result-card:hover,
.clinic-result-card:hover {
  transform: translateY(-1px);
}

/* Clinic specialty badge interactive */
.clinic-spec-badge {
  transition: all .15s;
  cursor: pointer;
}
.clinic-spec-badge:hover {
  background: var(--og-brand-50) !important;
  color: var(--og-brand-700) !important;
}

/* Clinic card avatar hover scale */
.clinic-result-card .avatar {
  transition: transform .2s, box-shadow .2s;
}
.clinic-result-card:hover .avatar {
  transform: scale(1.05);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .search-result-card,
  .clinic-result-card,
  .clinic-spec-badge,
  .clinic-result-card .avatar {
    animation: none !important;
    transition: none !important;
  }
}

/* ======================================================================
   Tab Underline
   ====================================================================== */
.border-brand-500 { border-color: var(--og-brand-500) !important; }
.border-transparent { border-color: transparent !important; }

/* ======================================================================
   Offcanvas Bottom Sheet
   ====================================================================== */
.offcanvas-bottom.rounded-top-4 {
  border-top-left-radius: 1.5rem !important;
  border-top-right-radius: 1.5rem !important;
}

/* ======================================================================
   Print
   ====================================================================== */
@media print {
  .no-print { display: none !important; }
}
