:host.collab-toolbar-host {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--collab-z-toolbar, 1000);
  pointer-events: none;
}

.collab-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: rgba(14, 21, 32, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  pointer-events: all;
  animation: collabSlideUp 0.3s ease forwards;

  &__session-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: grab;

    &:active {
      cursor: grabbing;
    }
  }

  &__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #718096;
    flex-shrink: 0;

    &.connected    { background: #38b2ac; }
    &.disconnected { background: #fc8181; }
    &.reconnecting {
      background: #d69e2e;
      animation: collabPulse 1.2s ease-in-out infinite;
    }
  }

  &__code {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.08em;
  }

  &__count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
  }

  &__divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
  }

  &__btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.15s;
    color: rgba(255, 255, 255, 0.7);

    mat-icon {
      font-size: 18px;
      width: 18px;
      height: 18px;
      line-height: 18px;
    }

    &:hover {
      background: rgba(255, 255, 255, 0.08);
    }

    &.active {
      background: var(--collab-teal-glow, rgba(56, 178, 172, 0.15));
      color: var(--collab-teal, #38b2ac);
    }

    &.danger {
      background: var(--collab-red-dim, rgba(197, 48, 48, 0.15));
      color: var(--collab-red, #fc8181);

      &:hover {
        background: rgba(197, 48, 48, 0.25);
      }
    }

    &--end {
      width: auto;
      border-radius: 20px;
      padding: 0 12px;
      background: var(--collab-red-dim, rgba(197, 48, 48, 0.20));
      color: var(--collab-red, #fc8181);

      &:hover {
        background: rgba(197, 48, 48, 0.30);
      }
    }
  }

  &__btn-label {
    font-size: 12px;
    font-weight: 500;
  }

  &__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 7px;
    background: var(--collab-teal, #38b2ac);
    color: #fff;
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    line-height: 14px;
    text-align: center;
  }

  &__timer {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    color: var(--collab-teal, #38b2ac);
    min-width: 44px;
    text-align: center;
  }
}

@keyframes collabSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes collabPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
