/* BidFresh brand logo — shared sizing across marketplace, dashboards, auth, reports */

.bf-logo-img {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

/* Full logo (wordmark + Farmers Decide tagline) */
.bf-logo-img--full { height: 52px; max-width: 200px; }
.bf-logo-img--auth { height: 58px; max-width: 220px; }
.bf-logo-img--footer { height: 50px; max-width: 190px; }
.bf-logo-img--report { height: 54px; max-width: 205px; }

/* Compact wordmark (no tagline) */
.bf-logo-img--header { height: 38px; max-width: 140px; }
.bf-logo-img--topbar { height: 48px; max-width: 135px; }
.bf-logo-img--sidebar { height: 42px; max-width: 176px; }
.bf-logo-img--sidebar-sm { height: 28px; max-width: 72px; object-fit: contain; object-position: left center; }
.bf-logo-img--network { height: 44px; max-width: 160px; }

.bf-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none !important;
}

/* Marketplace topbar — full logo (wordmark + tagline) */
.topbar-logo {
  overflow: visible;
}

.topbar-logo .bf-logo-link {
  max-width: 100%;
}

.topbar-logo .bf-logo-img--topbar {
  height: 48px;
  width: auto;
  max-width: 135px;
  object-fit: contain;
  object-position: center center;
}

@media (max-width: 1023px) {
  .topbar-logo .bf-logo-img--topbar { height: 42px; max-width: 118px; }
}

@media (max-width: 767.98px) {
  .topbar-logo .bf-logo-img--topbar { height: 40px; max-width: 112px; }
}

@media (max-width: 480px) {
  .topbar-logo .bf-logo-img--topbar { height: 38px; max-width: 106px; }
}

/* Admin / dashboard theme slots — single visible logo (light/dark swap) */
.header .header-left .logo,
.header .header-left .dark-logo {
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
  overflow: visible !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 auto !important;
}

.header .header-left .logo {
  display: inline-flex !important;
}

.header .header-left .dark-logo {
  display: none !important;
}

[data-bs-theme=dark] .header .header-left .logo {
  display: none !important;
}

[data-bs-theme=dark] .header .header-left .dark-logo {
  display: inline-flex !important;
}

.header .header-left .logo img,
.header .header-left .dark-logo img,
.header .header-left .bf-logo-img--header {
  height: 38px !important;
  width: auto !important;
  max-width: 140px !important;
  object-fit: contain !important;
  object-position: center center !important;
}

@media (max-width: 991.98px) {
  .header .header-left {
    overflow: visible !important;
  }

  /* Override theme.css width:100% on both logo slots — only one is visible */
  .header .header-left .logo,
  .header .header-left .dark-logo {
    width: auto !important;
    flex: 0 0 auto !important;
  }

  .header .header-left .logo img,
  .header .header-left .dark-logo img,
  .header .header-left .bf-logo-img--header {
    width: auto !important;
    height: 40px !important;
    max-height: 40px !important;
    max-width: min(128px, calc(100vw - 140px)) !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}

@media (max-width: 480px) {
  .header .header-left .logo img,
  .header .header-left .dark-logo img,
  .header .header-left .bf-logo-img--header {
    height: 36px !important;
    max-height: 36px !important;
    max-width: min(118px, calc(100vw - 132px)) !important;
  }
}

/* Sidebar logos — all role dashboards */
.sidebar-logo img,
.sidebar-logo .bf-logo-img {
  max-width: 70%;
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}

.twocol-mini img,
.twocol-mini .bf-logo-img {
  max-width: 70%;
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}

.sidebar .sidebar-logo .logo img,
.sidebars .sidebar-logo .logo img,
.two-col-sidebar .sidebar-logo .logo img {
  width: auto !important;
  height: auto !important;
  max-width: 70% !important;
  object-fit: contain !important;
}

.sidebar .sidebar-logo .logo-small img,
.sidebar .sidebar-logo .dark-small img,
.sidebars .sidebar-logo .logo-small img,
.sidebars .sidebar-logo .dark-small img,
.two-col-sidebar .sidebar-logo .logo-small img,
.two-col-sidebar .sidebar-logo .dark-small img {
  height: 28px !important;
  width: auto !important;
  max-width: 72px !important;
  object-fit: contain !important;
  object-position: left center !important;
}

.sidebar .sidebar-logo .dark-logo img,
.sidebars .sidebar-logo .dark-logo img,
.two-col-sidebar .sidebar-logo .dark-logo img {
  width: auto !important;
  height: auto !important;
  max-width: 70% !important;
  object-fit: contain !important;
}

.report-logo,
.bf-network-logo {
  height: 54px !important;
  width: auto !important;
  max-width: 205px !important;
  object-fit: contain !important;
}

.footer-logo-img {
  height: 50px !important;
  width: auto !important;
  max-width: 190px !important;
  object-fit: contain !important;
  margin-bottom: 12px;
}

/* Auth pages */
.auth-mobile-logo.bf-logo-link,
.auth-mobile-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none !important;
}

.auth-mobile-logo .bf-logo-img--auth { height: 54px; max-width: 210px; }

.vdp-mheader-logo .bf-logo-img--topbar {
  height: 36px;
  max-width: 100px;
}

@media (max-width: 900px) {
  .bf-logo-img--auth { height: 50px; max-width: 190px; }
}
