/* Light theme defaults (dark theme is scoped below) */
body { background: #F0F2F5; }
.navbar-brand { font-weight: 600; }
.card { box-shadow: 0 1px 2px rgba(0,0,0,0.05); border-radius: 12px; }
.table td, .table th { vertical-align: middle; }

/* Inputs - general improvements */
.form-control, .form-select { border-width: 2px; }
/* Larger, rounder inputs */
.form-control, .form-select { border-radius: .6rem; padding: .6rem .9rem; font-size: 1rem; }
.input-group-text { background: #f3f4f6; color: #111827; border-width: 2px; border-radius: .6rem; }
/* Stronger focus glow (light) */
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 .2rem rgba(24,119,242,.25), 0 2px 10px rgba(24,119,242,.12); }
.input-group .form-control, .input-group .form-select { border-left-width: 0; }
.input-group .form-control:focus, .input-group .form-select:focus { border-left-width: 0; }
.form-label { font-weight: 600; }
.form-control::file-selector-button { background: var(--bs-primary); color: #fff; border: 0; padding: .375rem .75rem; margin-right: .75rem; }
.form-control:hover::file-selector-button { background: #166FE5; }

/* Group cards */
.group-card { transition: transform .12s ease, box-shadow .12s ease; overflow: hidden; }
.group-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.group-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge-category { border-radius: 999px; padding: .35em .6em; font-weight: 600; }

/* Utilities */
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Color theme overrides (make site more colorful) --- */
:root{
  /* Facebook-like palette */
  --bs-primary:#1877F2; /* FB blue */
  --bs-secondary:#42B72A; /* FB green */
  --bs-success:#42B72A;
  --bs-info:#1877F2;
  --bs-warning:#F7B928;
  --bs-danger:#E53935;
  --bs-dark:#0b1220;
  --bs-light:#111827;
}

.bg-primary{ background-color: var(--bs-primary)!important; }
.btn-primary{ background-color: var(--bs-primary); border-color: var(--bs-primary); }
.btn-primary:hover{ background-color:#166FE5; border-color:#166FE5; }
.btn-outline-primary{ color: var(--bs-primary); border-color: var(--bs-primary); }
.btn-outline-primary:hover{ background-color: var(--bs-primary); border-color: var(--bs-primary); color:#fff; }

/* Nav pills active color (FB-style light blue background) */
.nav-pills .nav-link.active, .nav-pills .show>.nav-link{
  background-color: #E7F3FF;
  color: #1877F2;
}

/* Links */
a{ color: #1877F2; }
a:hover{ color: #166FE5; }

/* Fancy header gradient */
header.hero, .hero-bar{
  background: linear-gradient(135deg, #6c5ce7, #0ea5e9);
  color:#fff;
}

/* Navbar light (Facebook style) */
.navbar-light.bg-white { border-bottom: 1px solid rgba(0,0,0,0.08); }
.navbar-light .navbar-brand { color: #1877F2; }
.navbar-light .nav-link { color: #050505; }
.navbar-light .nav-link:hover, .navbar-light .nav-link:focus { color: #1877F2; }

/* Category badge subtle */
.badge-category{ background: #E7F3FF; color: #1877F2; }

/* Card look */
.card { background:#fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 10px; }

/* --- Dark theme overrides (scoped) --- */
html[data-theme="dark"] body { background: #0f172a; color: #e5e7eb; }
html[data-theme="dark"] .text-muted { color: #94a3b8 !important; }

/* Containers and cards */
html[data-theme="dark"] .card { background: #111827; border: 1px solid rgba(148,163,184,0.12); box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
html[data-theme="dark"] .group-card:hover { box-shadow: 0 10px 24px rgba(0,0,0,0.35); }

/* Tables */
html[data-theme="dark"] .table { color: #e5e7eb; }
html[data-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd) { --bs-table-accent-bg: rgba(255,255,255,0.04); color: inherit; }
html[data-theme="dark"] .table thead th { color: #cbd5e1; border-bottom-color: rgba(148,163,184,0.18); }
html[data-theme="dark"] .table td, html[data-theme="dark"] .table th { border-color: rgba(148,163,184,0.12); }

/* Forms */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
  background-color: #0f172a;
  color: #e5e7eb;
  border-color: #374151;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 1px 1px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .form-text { color: #94a3b8; }
html[data-theme="dark"] ::placeholder { color: #9ca3af !important; opacity: 1; }
html[data-theme="dark"] .form-label { color: #e5e7eb; }
html[data-theme="dark"] .input-group-text { background: #1f2937; color: #e5e7eb; border-color: #374151; border-width: 2px; }
html[data-theme="dark"] .form-control, html[data-theme="dark"] .form-select { border-width: 2px; }
html[data-theme="dark"] .form-control:hover, html[data-theme="dark"] .form-select:hover { border-color: #4b5563; }
html[data-theme="dark"] .form-control:focus, html[data-theme="dark"] .form-select:focus {
  border-color: #3b82f6;
  box-shadow:
    0 0 0 .2rem rgba(59,130,246,.22),
    0 3px 12px rgba(59,130,246,.18),
    inset 0 1px 0 rgba(255,255,255,0.04);
}
/* Input groups cohesion */
html[data-theme="dark"] .input-group .form-control,
html[data-theme="dark"] .input-group .form-select { border-left-width: 0; }
html[data-theme="dark"] .input-group .input-group-text { border-right-width: 0; }
html[data-theme="dark"] .input-group:focus-within .input-group-text {
  border-color: #3b82f6;
  box-shadow: 0 0 0 .15rem rgba(59,130,246,.20);
}
/* Textareas */
html[data-theme="dark"] textarea.form-control { min-height: 120px; }
/* Multi-select improvements */
.form-select[multiple] { height: auto; min-height: 42px; }
html[data-theme="dark"] .form-select option { background-color: #0f172a; color: #e5e7eb; }

/* Navbar colors in dark */
html[data-theme="dark"] .navbar.navbar-dark.bg-primary { background: #0b5ed7 linear-gradient(180deg, rgba(24,119,242,0.95), rgba(13,78,182,0.95)) !important; }
/* Pure black navbar remains enforced regardless of theme by class */
.navbar.navbar-dark.bg-dark { background: #000 !important; }
.navbar.navbar-dark .nav-link, .navbar.navbar-dark .navbar-brand { color: #e5e7eb; }
.navbar.navbar-dark .nav-link:hover { color: #fff; }

/* Buttons (dark theme tuning) */
html[data-theme="dark"] .btn-primary { background-color: #1877F2; border-color: #1877F2; }
html[data-theme="dark"] .btn-primary:hover { background-color:#166FE5; border-color:#166FE5; }
html[data-theme="dark"] .btn-outline-primary { color: #93c5fd; border-color: #3b82f6; }
html[data-theme="dark"] .btn-outline-primary:hover{ background-color: #3b82f6; border-color: #3b82f6; color:#0b1220; }
html[data-theme="dark"] .btn-outline-secondary { color: #cbd5e1; border-color: #475569; }
html[data-theme="dark"] .btn-outline-secondary:hover { background-color:#475569; border-color:#475569; color:#fff; }
html[data-theme="dark"] .btn-outline-danger { color: #fecaca; border-color: #ef4444; }
html[data-theme="dark"] .btn-outline-danger:hover { background:#ef4444; border-color:#ef4444; color:#fff; }

/* Links */
html[data-theme="dark"] a { color: #93c5fd; }
html[data-theme="dark"] a:hover { color: #bfdbfe; }

/* Nav pills */
html[data-theme="dark"] .nav-pills .nav-link { color: #cbd5e1; }
html[data-theme="dark"] .nav-pills .nav-link.active,
html[data-theme="dark"] .nav-pills .show>.nav-link{
  background-color: #1e3a8a; /* dark blue */
  color: #e5e7eb;
}

/* Badges */
html[data-theme="dark"] .badge-category{ background: rgba(59,130,246,0.15); color: #bfdbfe; border: 1px solid rgba(59,130,246,0.25); }

/* Inputs and checkboxes */
html[data-theme="dark"] .form-check-input { background-color:#111827; border-color:#374151; }
html[data-theme="dark"] .form-check-input:checked { background-color:#3b82f6; border-color:#3b82f6; }
