/* Top-nav company switcher trigger + Zoho-style right offcanvas */

.company-switcher-trigger-item {
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  margin-right: 0.25rem;
  padding-right: 0.25rem;
}

/* Beat site.css .top-navbar span:not(.fa)… { color: var(--app-font-color) !important } */
.top-navbar .company-switcher-trigger-item .company-switcher-trigger.nav-link,
.top-navbar .company-switcher-trigger-item .company-switcher-trigger.btn-link,
.top-navbar .company-switcher-trigger-item .company-switcher-trigger:hover,
.top-navbar .company-switcher-trigger-item .company-switcher-trigger:focus,
.top-navbar .company-switcher-trigger-item .company-switcher-trigger:active {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  max-width: 180px;
  color: #fff !important;
  text-decoration: none !important;
}

.top-navbar .company-switcher-trigger-item span.company-switcher-trigger-name:not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not(.bi) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff !important;
}

.top-navbar .company-switcher-trigger-item .company-switcher-trigger i.bi,
.top-navbar .company-switcher-trigger-item .company-switcher-trigger .bi.company-switcher-trigger-chevron {
  font-size: 0.7rem;
  flex-shrink: 0;
  color: #fff !important;
  opacity: 0.9;
}

/* Above .top-navbar (z-index: 1100) so header/Manage/X are not clipped under the bar */
.company-switcher-panel.offcanvas,
.offcanvas.company-switcher-panel {
  --bs-offcanvas-width: 400px;
  --bs-offcanvas-zindex: 1300;
  --company-switcher-accent: #0d6efd;
  z-index: 1300;
}

.offcanvas-backdrop.company-switcher-backdrop,
body:has(.company-switcher-panel.show) .offcanvas-backdrop {
  z-index: 1290;
}

.company-switcher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid #e9ecef;
}

.company-switcher-header .offcanvas-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0;
  color: #212529;
}

.company-switcher-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  flex-shrink: 0;
}

.company-switcher-manage {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--company-switcher-accent);
  text-decoration: none;
  white-space: nowrap;
}

.company-switcher-manage:hover {
  text-decoration: underline;
  color: var(--company-switcher-accent);
}

.company-switcher-manage .bi {
  font-size: 0.95rem;
}

.company-switcher-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f3f5;
  color: #495057;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.company-switcher-close:hover {
  background: #e9ecef;
  color: #212529;
}

.company-switcher-close:focus-visible {
  outline: 2px solid var(--company-switcher-accent);
  outline-offset: 2px;
}

.company-switcher-close .bi {
  font-size: 0.95rem;
  line-height: 1;
}

.company-switcher-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: none;
  padding: 0.75rem 0 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid #e9ecef;
}

.company-switcher-list {
  display: flex;
  flex-direction: column;
}

.company-switcher-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid #f1f3f5;
  cursor: pointer;
  border-radius: 0.35rem;
  transition: background-color 0.12s ease;
}

.company-switcher-row:hover {
  background-color: #f8f9fa;
}

.company-switcher-row.is-current {
  cursor: default;
}

.company-switcher-row.is-switching {
  opacity: 0.6;
  pointer-events: none;
}

.company-switcher-row-icon {
  width: 40px;
  height: 40px;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--company-switcher-accent);
  background: #fff;
  font-size: 1.1rem;
}

.company-switcher-row-body {
  min-width: 0;
}

.company-switcher-row-name {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: #212529;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-switcher-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: #6c757d;
}

.company-switcher-row-meta .meta-sep {
  opacity: 0.6;
}

.company-switcher-copy-id {
  border: 0;
  background: transparent;
  padding: 0 0.15rem;
  color: #6c757d;
  line-height: 1;
  cursor: pointer;
}

.company-switcher-copy-id:hover {
  color: var(--company-switcher-accent);
}

.company-switcher-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--company-switcher-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.company-switcher-check-placeholder {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .company-switcher-panel.offcanvas {
    --bs-offcanvas-width: 100%;
  }

  .top-navbar .company-switcher-trigger-item .company-switcher-trigger.nav-link {
    max-width: 120px;
  }
}
