@media(min-width: 800px) {
  .nodehive-info {
    height: 0;
    position: absolute;
    right: 1rem;
    top: -6.2rem;
  }
}

#dashboard-node-hive-spaces-block .favicon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-top: 6px;
}

/* ==========================================================================
   Compact sidebar bar
   ========================================================================== */

.nodehive-sidebar-compact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--gin-border-color-layer, #e4e4e7);
  font-size: 0.8125rem;
  line-height: 1.4;
}

/* Content info group (badge + translations) */
.nodehive-compact-info {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
}

/* Type badge */
.nodehive-type-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  background: var(--gin-bg-layer2, #f0f0f0);
  color: var(--gin-color-text-light, #555);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  white-space: nowrap;
}

/* Translations container */
.nodehive-compact-translations {
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

/* Override nested container divs to not break flex layout */
.nodehive-sidebar-compact > .nodehive-compact-info > .nodehive-compact-translations > div {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Language pills — match content-x dense view style */
.nodehive-compact-translations .language-has-translation,
.nodehive-compact-translations .language-add-translation {
  width: auto;
  height: auto;
  border-radius: 3px;
  border: none;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  margin-right: 0;
  text-transform: uppercase;
  text-decoration: none;
}

.nodehive-compact-translations .language-has-translation {
  background: var(--gin-color-primary, #003cc5);
  color: #fff;
}

.nodehive-compact-translations .language-has-translation:hover {
  background: var(--gin-color-primary-hover, #002a8a);
  border: none;
  color: #fff;
}

.nodehive-compact-translations .language-add-translation {
  background: transparent;
  color: #d1d5db;
  border: 1px dashed #d1d5db;
}

.nodehive-compact-translations .language-add-translation:hover {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px dashed #9ca3af;
}

/* Divider between info group and space groups */
.nodehive-compact-info + .nodehive-compact-space::before {
  content: '';
  display: block;
  width: 1px;
  height: 18px;
  background: var(--gin-border-color-layer, #d4d4d8);
  margin-right: 0.375rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Space pill — shared base for space switcher and action buttons
   ========================================================================== */

.nodehive-compact-space {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  height: 28px;
  background: var(--gin-bg-layer2, #f5f5f5);
  border: 1px solid var(--gin-border-color-layer, #e4e4e7);
  border-radius: 6px;
}

.nodehive-compact-space-label {
  font-weight: 600;
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--gin-color-text, #333);
  text-decoration: none;
  padding: 0 0.5rem;
}

.nodehive-compact-space-label:hover {
  color: var(--gin-color-primary, #003cc5);
}

.nodehive-compact-space-label--active {
  cursor: default;
}

.nodehive-compact-space-label--active:hover {
  color: var(--gin-color-text, #333);
}

/* ==========================================================================
   Space switcher dropdown
   ========================================================================== */

.nodehive-space-switcher {
  position: relative;
  display: flex;
  align-items: center;
}

.nodehive-space-switcher__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 26px;
  padding: 0;
  margin: 0;
  border: none;
  border-left: 1px solid var(--gin-border-color-layer, #e4e4e7);
  background: transparent;
  color: var(--gin-color-text-light, #71717a);
  cursor: pointer;
  border-radius: 0 5px 5px 0;
  transition: color 0.15s, background 0.15s;
}

.nodehive-space-switcher__toggle:hover {
  color: var(--gin-color-text, #333);
  background: var(--gin-bg-layer3, #e8e8ec);
}

.nodehive-space-switcher__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100;
  min-width: 180px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--gin-bg-layer, #fff);
  border: 1px solid var(--gin-border-color-layer, #d4d4d8);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 150ms ease;
}

.nodehive-space-switcher__list.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nodehive-space-switcher__heading {
  padding: 6px 10px 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gin-color-text-light, #5d5d5d);
}

.nodehive-space-switcher__item {
  display: block;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--gin-color-text, #2e2e2e);
  text-decoration: none;
  transition: background 0.15s;
}

.nodehive-space-switcher__item:hover {
  background: var(--gin-bg-item-hover, rgba(0, 0, 0, 0.04));
  color: var(--gin-color-primary, #003cc5);
}

/* ==========================================================================
   Action icon buttons
   ========================================================================== */

.nodehive-compact-actions {
  display: flex;
  align-items: center;
}

.nodehive-compact-actions > div {
  display: flex;
}

.nodehive-compact-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--gin-color-text-light, #71717a);
  transition: color 0.15s, background 0.15s;
}

.nodehive-compact-action:first-child {
  border-radius: 5px 0 0 5px;
}

.nodehive-compact-action:last-child {
  border-radius: 0 5px 5px 0;
}

.nodehive-compact-action:only-child {
  border-radius: 5px;
}

.nodehive-compact-action:hover {
  color: var(--gin-color-primary, #003cc5);
  background: var(--gin-bg-layer3, #e8e8ec);
}

.nodehive-compact-action + .nodehive-compact-action,
.nodehive-compact-actions > div + div > .nodehive-compact-action {
  border-left: 1px solid var(--gin-border-color-layer, #e4e4e7);
}

.nodehive-compact-action svg {
  display: block;
  flex-shrink: 0;
}

.nodehive-compact-action--labeled {
  width: auto;
  padding: 0 0.5rem;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: none;
}

/* ==========================================================================
   Configure dropdown (Manage fields etc.)
   ========================================================================== */

.nodehive-compact-configure {
  margin-left: auto;
}

/* Responsive: allow wrap on narrow screens */
@media (max-width: 800px) {
  .nodehive-compact-configure {
    margin-left: 0;
  }
}
