/* Space selector component (topbar) */

.pc-header .space-selector-dropdown {
  margin-left: 8px;
  --bs-dropdown-spacer: 0;
}

.pc-header .space-selector-trigger {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 360px;
  max-width: 700px;
  border: 1.5px solid #22b08f;
  border-radius: 10px;
  min-height: 44px;
  padding: 2px;
  overflow: hidden;
  background: #dff4ee;
  text-decoration: none;
}

.pc-header .space-selector-trigger:hover,
.pc-header .space-selector-trigger:focus,
.pc-header .space-selector-trigger:focus-visible {
  border-color: #169b7d;
  box-shadow: 0 0 0 0.2rem rgba(34, 176, 143, 0.15);
}

.pc-header .space-selector-trigger::after {
  margin: auto 12px auto 8px;
  color: #138a70;
}

.pc-header .space-selector-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  padding: 0 14px;
  border-right: 1px solid #bde8dc;
  color: #138a70;
  background: #dff4ee;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.pc-header .space-icon {
  font-size: 16px;
  color: #138a70;
}

.pc-header .space-selector-value {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  align-self: stretch;
  padding: 0 12px;
  flex: 1;
  background: #fff;
  border-radius: 8px;
}

.pc-header .space-selector-placeholder {
  color: #1f6fb4;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-header .space-selector-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  padding: 1px 0;
}

.pc-header .space-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 140px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #2eb293;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pc-header .space-tag-remove {
  border: none !important;
  box-shadow: none !important;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}

.pc-header .space-tag-remove:hover,
.pc-header .space-tag-remove:focus,
.pc-header .space-tag-remove:focus-visible {
  background: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.pc-header .space-tag-remove .ti {
  font-size: 10px;
}

.pc-header .space-selector-overflow {
  background: #1f8d73;
  color: #fff;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
}

.pc-header .space-selector-menu {
  width: 100%;
  min-width: 100%;
  max-width: none;
  border: 1.5px solid #22b08f;
  border-radius: 0 0 10px 10px;
  margin-top: 0 !important;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.15);
  top: 100% !important;
  left: 0 !important;
}

.pc-header .space-selector-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e6edf3;
  padding: 10px 12px;
}

.pc-header .space-selector-search-wrap .ti {
  color: #8a97ab;
}

.pc-header .space-selector-search {
  border-color: #d3dbe8;
  font-size: 13px;
}

.pc-header .space-selector-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #e6edf3;
}

.pc-header .space-selector-action {
  border-radius: 0;
  border: none;
  border-right: 1px solid #e6edf3;
  padding: 9px 12px;
  color: #179a7f;
  font-weight: 600;
  text-decoration: none;
}

.pc-header .space-selector-action:last-child {
  border-right: none;
}

.pc-header .space-selector-action:hover,
.pc-header .space-selector-action:focus {
  background: #f1fbf8;
  color: #12866e;
}

.pc-header .space-selector-list-wrap {
  max-height: 280px;
  overflow-y: auto;
}

.pc-header .dropdown-spaces-list {
  margin: 0;
}

.pc-header .dropdown-item.dropdown-spaces {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid transparent;
  white-space: nowrap;
}

.pc-header .dropdown-item.dropdown-spaces:hover {
  background: #f6fbff;
}

.pc-header .dropdown-item.dropdown-spaces.active {
  background: #f0faf7;
  border-left-color: #22b08f;
}

.pc-header .space-check-icon {
  width: 20px;
  height: 20px;
  border: 1.5px solid #d1d9e6;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: #fff;
  flex-shrink: 0;
  line-height: 1;
  overflow: visible;
}

.pc-header .space-check-icon .ti {
  font-size: 12px;
  line-height: 1;
  display: block;
}

.pc-header .dropdown-item.dropdown-spaces.active .space-check-icon {
  background: #22b08f;
  border-color: #22b08f;
  color: #fff;
}

.pc-header .space-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #4f5d75;
  font-weight: 500;
}

.pc-header .dropdown-item.dropdown-spaces .form-check-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  pointer-events: none;
}

.pc-header .space-selector-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e6edf3;
  background: #f9fbfd;
  padding: 10px 12px;
}

.pc-header .space-selector-count {
  font-size: 12px;
  color: #6b7a91;
}

.pc-header .space-selector-footer .btn-primary {
  background: #22b08f;
  border-color: #22b08f;
  font-size: 13px;
  font-weight: 600;
  min-width: 92px;
}

.pc-header .space-selector-footer .btn-primary:hover,
.pc-header .space-selector-footer .btn-primary:focus {
  background: #179a7f;
  border-color: #179a7f;
}

@media (max-width: 991.98px) {
  .pc-header .space-selector-trigger {
    min-width: 260px;
    max-width: 80vw;
    min-height: 42px;
  }

  .pc-header .space-selector-label {
    font-size: 13px;
  }

  .pc-header .space-selector-placeholder,
  .pc-header .space-tag,
  .pc-header .space-selector-overflow {
    font-size: 12px;
  }

  .pc-header .space-selector-menu {
    width: 100%;
    min-width: 100%;
  }
}
