/*
 * InstantDrConsult — Global Design Override
 * Replaces Geex template styles with HealthApp-inspired purple UI
 * Primary: #7c3aed  |  BG: #f5f5fa  |  White sidebar/cards
 */

/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
  --primary:       #7c3aed;
  --primary-light: #f5f3ff;
  --primary-mid:   #ede9fe;
  --primary-dark:  #5b21b6;
  --bg-main:       #f5f5fa;
  --white:         #ffffff;
  --border:        #e5e7eb;
  --text:          #111827;
  --text-sec:      #6b7280;
  --text-muted:    #9ca3af;
  --sidebar-w:     260px;
  --header-h:      64px;
  --radius:        10px;
  --shadow-card:   0 1px 4px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.04);
}

/* ── Base reset ────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-main) !important;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
  font-size: 14px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Override Geex body background */
body.geex-main {
  background: var(--bg-main) !important;
}

/* ── Card style (for pages that use .card or .page-card) ────────── */
.page-card,
.card-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  padding: 24px;
}

/* ── Page header (title + action button row) ────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1,
.page-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

/* ── Primary button ─────────────────────────────────────────────── */
.btn-primary-purple,
.btn.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  padding: 9px 20px !important;
  font-size: 14px !important;
  transition: background 0.15s !important;
}
.btn-primary-purple:hover,
.btn.btn-primary:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

/* ── Table styles ───────────────────────────────────────────────── */
.table thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  background: #fafafa;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}

.table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: var(--text);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #faf8ff;
}

/* ── Badge / status chips ───────────────────────────────────────── */
.badge-purple {
  background: var(--primary-mid);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Input / form ───────────────────────────────────────────────── */
input, select, textarea {
  font-family: inherit !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12) !important;
}

/* ── Scrollbar (WebKit) ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Suppress Geex sidebar/layout classes ────────────────────────
   (The new layout uses pure inline styles so we neutralise old Geex
   rules that would otherwise collide with the new sidebar)          */
.geex-dashboard {
  display: flex !important;
  min-height: 100vh !important;
  background: var(--bg-main) !important;
}

/* Keep Geex body overlay behaviour only on mobile */
body.overlay_active::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 39;
}

/* ── Responsive: hide sidebar on small screens by default ────────── */
@media (max-width: 767px) {
  .mobile-hamburger {
    display: flex !important;
  }
}

/* ── Tailwind utility gap helpers ────────────────────────────────── */
.gap-page { gap: 24px; }

/* ── Typography helpers ─────────────────────────────────────────── */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.text-purple { color: var(--primary) !important; }
.bg-purple   { background: var(--primary) !important; }

/* ── Clerk watermark hide (keep from index.css) ──────────────────── */
clerk-dev-browser,
[data-clerk-dev-browser],
.cl-devBrowserWidget,
.cl-internal-devBrowser,
[class*="cl-devBrowser"] {
  display: none !important;
}
