@import './team-space-tokens';

.ts-detail {
  display: flex;
  flex-direction: column;
  font-family: $ts-font;
  width: min(820px, 92vw);
  height: min(680px, 88vh);
}

.ts-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 8px;
  border-bottom: 1px solid $ts-border;

  h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    color: $ts-ink;
  }
}

.ts-detail-desc {
  margin: 4px 0 12px;
  font-size: 13px;
  color: $ts-ink-muted;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: $ts-ink-muted;
  cursor: pointer;
  flex-shrink: 0;

  &:hover {
    background: $ts-surface-muted;
    color: $ts-ink;
  }
}

.ts-detail-loading {
  padding: 40px;
  text-align: center;
  color: $ts-ink-muted;
}

.ts-tabs {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;

  ::ng-deep .mat-mdc-tab-body-wrapper {
    flex: 1;
    min-height: 0;
  }

  ::ng-deep .mdc-tab__text-label {
    color: $ts-ink-muted;
    font-weight: 600;
  }

  ::ng-deep .mdc-tab-indicator__content--underline {
    border-color: $ts-accent !important;
  }
}

.ts-members-panel {
  padding: 16px 24px;
  height: 100%;
  overflow-y: auto;
}

.ts-members-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ts-member-count {
  font-size: 13px;
  color: $ts-ink-muted;
}

.ts-add-member-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.field-input {
  font-family: $ts-font;
  font-size: 14px;
  color: $ts-ink;
  padding: 8px 10px;
  border: 1px solid $ts-border;
  border-radius: 8px;
  background: $ts-surface;
  flex: 1;
}

.ts-member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ts-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid $ts-border;
  border-radius: 8px;
}

.ts-member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: $ts-accent-light;
  color: $ts-accent-dark;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.ts-member-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.ts-member-name {
  font-size: 14px;
  font-weight: 600;
  color: $ts-ink;
}

.ts-member-role-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  background: $ts-surface-muted;
  color: $ts-ink-muted;

  &.owner {
    background: $ts-accent-light;
    color: $ts-accent-dark;
  }
}

.ts-discussion-panel {
  height: 100%;
  padding: 12px 24px 20px;
  display: flex;
}

.btn {
  font-family: $ts-font;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: $ts-accent;
  color: white;

  &:hover {
    background: $ts-accent-dark;
  }
}

.btn-sm {
  font-size: 13px;
  padding: 7px 14px;

  mat-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
  }
}
