/* branding.css - Corporate Branding Styles */
/* No frameworks, vanilla CSS only */

:root {
  --brand-primary: #2563eb;
  --brand-secondary: #7c3aed;
  --brand-text: #1f2937;
  --brand-bg: #ffffff;

  /* Header sizing */
  --brand-header-height: 64px;
}

/* Dark theme overrides (if theme system exists) */
[data-theme="dark"] {
  --brand-text: #f9fafb;
  --brand-bg: #111827;
}

/* Brand Header Container */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 24px;
  background-color: var(--brand-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  height: var(--brand-header-height);
  box-sizing: border-box;
  gap: 16px;
}

/* Dark theme border */
[data-theme="dark"] .brand-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* -------------------------------------------------------
   Semantic logo size classes — use these everywhere.
   SVGs must have a viewBox (no fixed width/height attrs)
   for these height values to actually scale the image.
   Use the img-prefixed selector to win over generic rules.
   ------------------------------------------------------- */

/* Full-width wordmark: top navbar, dashboard header */
img.logo-main {
  height: 44px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* Compact wordmark: sidebar, wizard sidebar */
img.logo-sidebar {
  height: 40px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* Square/icon mark only: login card, auth header */
img.logo-mark {
  height: 48px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* Sidebar brand container — never collapses, always shows logo */
.sidebar-brand {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  flex-shrink: 0;
}

/* -------------------------------------------------------
   Legacy .brand-logo class — kept for backward compat.
   New code should use .logo-main / .logo-sidebar instead.
   ------------------------------------------------------- */
.brand-logo {
  height: 32px;
  width: auto;
  max-width: 240px;
  display: block;
  object-fit: contain;
}

/* Bigger logo ONLY inside the brand header (login/register top bar) */
.brand-header .brand-logo {
  height: 40px;
  max-width: 420px;
}

/* Responsive: mobile */
@media (max-width: 640px) {
  :root {
    --brand-header-height: 72px;
  }

  .brand-header {
    padding: 10px 16px;
    height: var(--brand-header-height);
  }

  /* Make it clearly visible on mobile */
  .brand-header .brand-logo {
    height: 52px;
    max-width: 520px;
  }

  /* Keep the generic logo class conservative elsewhere */
  .brand-logo {
    height: 30px;
  }
}

/* Brand Title (optional text next to logo) */
.brand-title {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--brand-text);
  margin: 0;
  letter-spacing: -0.025em;
}

/* Responsive: hide title on very small screens */
@media (max-width: 480px) {
  .brand-title {
    display: none;
  }
}

/* Utility: Center variant */
.brand-header.center {
  justify-content: center;
}

/* Utility: With border shadow */
.brand-header.elevated {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   HARD OVERRIDES — force logo sizes (sidebar + wizard), defeat other CSS
   Add at end so it wins the cascade.
   ========================================================================== */

/* Sidebar / Wizard: force the logo size no matter what other CSS does */
.sidebar .sidebar-brand img.logo-sidebar,
#wizardSidebar .sidebar-brand img.logo-sidebar,
.premium-layout .sidebar .sidebar-brand img.logo-sidebar,
.sidebar-brand img.logo-sidebar {
  height: 44px !important; /* change to 40px if too big */
  width: auto !important;
  max-height: none !important;
  max-width: none !important;
  display: block !important;
}

/* Navbar/top areas: force logo-main */
.navbar img.logo-main,
header img.logo-main,
.topbar img.logo-main,
.brand-header img.logo-main {
  height: 48px !important; /* change to 44px if too big */
  width: auto !important;
  max-height: none !important;
  max-width: none !important;
  display: block !important;
}

/* Ensure the container never squashes it */
.sidebar-brand {
  min-height: 72px !important;
  padding: 14px 16px !important;
  align-items: center !important;
}

/* If some layout is scaling the whole sidebar, prevent it affecting the logo */
.sidebar .sidebar-brand {
  transform: none !important;
  zoom: 1 !important;
}