/**
 * CoolChop brand theme for every server-rendered page (admin, vendor, recruiter,
 * marketing, sign-in). Mirrors the customer app palette
 * (flutter-apps/cool_chop/lib/core/theme/app_colors.dart): orange primary,
 * soft neutral surfaces, 12-16px rounded corners.
 *
 * public/css/app.css itself is re-coloured by scripts/apply-brand-theme.mjs; this
 * file holds the rest of the look and loads after it.
 */
:root,
[data-bs-theme="light"] {
  --cc-primary: #ff6b35;
  --cc-primary-dark: #e64a19;
  /* Orange dark enough for text and white-on-orange buttons (WCAG AA) */
  --cc-primary-strong: #c2410c;
  --cc-primary-container: #ffe0b2;
  --cc-primary-tint: #fff3e0;

  --bs-body-bg: #f8f9fa;
  --bs-body-color: #424242;
  --bs-headings-color: #212121;
  --bs-secondary-color: #757575;
  --bs-border-color: #e8eaed;
  --bs-light: #f5f5f5;
  --bs-light-rgb: 245, 245, 245;

  --bs-link-color: var(--cc-primary-strong);
  --bs-link-color-rgb: 194, 65, 12;
  --bs-link-hover-color: #9a3412;
  --bs-link-hover-color-rgb: 154, 52, 18;

  --bs-primary-text-emphasis: #7c2d12;
  --bs-primary-bg-subtle: var(--cc-primary-tint);
  --bs-primary-border-subtle: #ffcc80;

  --bs-border-radius: 0.75rem;
  --bs-border-radius-sm: 0.5rem;
  --bs-border-radius-lg: 1rem;
  --bs-input-border-color: #dfe3e8;
}

body {
  background-color: var(--bs-body-bg);
}

/* Cards: white, soft border and shadow, rounded like the app's cards */
.card {
  border: 1px solid #eceff1;
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(33, 33, 33, 0.05);
}
.card-header {
  background-color: transparent;
  border-bottom: 1px solid #f0f2f4;
}

/* Buttons and fields share the app's 12px corners */
.btn {
  border-radius: 0.75rem;
  font-weight: 600;
}
.btn-sm {
  border-radius: 0.6rem;
}
.form-control,
.form-select {
  border-radius: 0.75rem;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--cc-primary);
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.2);
}
.btn-primary,
.btn-primary:hover,
.btn-primary:focus {
  color: #fff;
}
/* Small orange text on white needs the darker orange to stay readable */
.text-primary,
a.text-primary {
  color: var(--cc-primary-strong) !important;
}
.badge.bg-primary-subtle,
.text-bg-primary-subtle {
  color: #9a3412 !important;
}

/* Top bar: soft orange with dark controls; sidebar: white with orange active item */
html.topbar-dark {
  /* Same look as the public website header: white bar, hairline border, dark text */
  --bs-topbar-bg: #ffffff;
  --bs-topbar-item-color: #616161;
}
html.topbar-dark .topbar {
  border-bottom: 1px solid var(--bs-border-color);
  box-shadow: none;
}
html.topbar-dark .topbar .brand-name,
html.topbar-dark .topbar .logo-light .brand-name,
html.topbar-dark .topbar h4.text-white {
  color: #212121 !important;
}
html.topbar-dark .topbar .brand-accent {
  color: var(--cc-primary-strong) !important;
}
html.topbar-dark .topbar .button-toggle-menu,
html.topbar-dark .topbar .topbar-button {
  color: #616161;
  border-radius: 999px;
}
html.topbar-dark .topbar .topbar-button:hover,
html.topbar-dark .topbar .button-toggle-menu:hover {
  background: var(--cc-primary-tint);
  color: var(--cc-primary-strong);
}
.brand-accent {
  color: var(--cc-primary-strong);
}
.logo-light .brand-accent {
  color: var(--cc-primary-container);
}
html.sidebar-light {
  --bs-main-nav-bg: #ffffff;
}
.main-nav .nav-link.active,
.main-nav .nav-link:hover {
  color: var(--cc-primary-strong);
}

.page-title-box .page-title {
  color: #212121;
  font-weight: 700;
}

/* Wordmark colours for the logo lockup */
.logo-dark .brand-name {
  color: #212121;
}
.logo-box a:focus-visible,
.auth-logo a:focus-visible {
  outline-color: var(--cc-primary);
}
.brand-lockup .brand-mark {
  border-radius: 8px;
}

/* Tables */
.table > :not(caption) > * > * {
  border-bottom-color: #f0f2f4;
}
.table-light,
.table > thead.table-light,
.table > thead.bg-light {
  --bs-table-bg: #fff8f3;
}
